Wifi password not copied to new install since netplan transition

Bug #2036997 reported by Jeremy Bícha
This bug affects 3 people
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)

Bug Description

This is related to bug 2036999 except this is for the new Ubuntu Desktop Installer and the other bug is for Ubiquity ("legacy" installer)

What happened?
If a Wifi password is provided during the install, the Wifi network is supposed to be preconfigured with that password after install. It's not working with Ubuntu 23.10.

Steps to reproduce
Use the new Ubuntu Desktop installer to install Ubuntu 23.10 from a computer that has a wifi card
During the install, connect to a password-protected wifi network
After the install, the computer should be automatically connected to that network

Additional context
20230920 Ubuntu Desktop Mantic ISO

Ubuntu Desktop 23.10 now uses Netplan as the NetworkManager backend.

I do have a /etc/netplan/90-NM-{redacted-UUID}.yaml file which has the network listed but it doesn't seem to have the password saved.

wifi-security.auth-alg: "open" does not sound right to me.

  version: 2
      renderer: NetworkManager
        name: "wlp2s0"
      dhcp4: true
      dhcp6: true
        "{redacted Access Point name}":
            key-management: "psk"
            uuid: "{redacted-UUID}"
            name: "{redacted Access Point name}"
              wifi-security.auth-alg: "open"
              ipv6.addr-gen-mode: "default"
              ipv6.ip6-privacy: "-1"
              proxy._: ""
        uuid: "{redacted-UUID}"
         name: "{redacted Access Point name}"

This bug was cross-posted from https://github.com/canonical/ubuntu-desktop-installer/issues/2348

Jeremy Bícha (jbicha)
description: updated
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:

tags: added: iso-testing
Revision history for this message
Sebastien Bacher (seb128) wrote :

Adding a netplan entry for cross reference even if that's probably not an issue with netplan itself

tags: added: rls-mm-incoming
Changed in netplan.io (Ubuntu):
importance: Undecided → High
Changed in ubuntu-desktop-installer:
importance: Undecided → High
summary: - Wifi password not copied to new install
+ Wifi password not copied to new install since netplan transition
Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is probably that https://github.com/canonical/ubuntu-desktop-installer/blob/main/snap/local/postinst.d/10_copy_network_config needs to be updated to copy /etc/netplan/ in addition/instead of /etc/NetworkManager/system-connections

Netplan team, could be confirm that it's the right directory we want to copy over?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Reading the description there is also a question on the netplan configuration generated and on where the password is stored?

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Hi Seb,

Yes, copying /etc/netplan should be enough to fix this.

Although, in the live system (testing the beta image here), there is a file called /etc/netplan/50-cloud-init.yaml that we maybe don't want to copy? It has two connections, zz-all-en and zz-all-eth. If we copy it, the user will find these two connections in their system (it will show up in nmcli con show for example).

So we probably just want to copy /etc/netplan/01-network-manager-all.yaml and anything that starts with /etc/netplan/90-NM-* (because these are the files created when the interfaces are configured in the live system).

The WPA password will be stored in the yaml file.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netplan.io (Ubuntu):
status: New → Confirmed
tags: added: foundations-todo
removed: rls-mm-incoming
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks. Do you know what is creating /etc/netplan/01-network-manager-all.yaml ? It seems we shouldn't need that one since ubuntu-settings already include /lib/netplan/00-network-manager-all.yaml

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Ah yes, 00-network-manager-all.yaml is installed by the ubuntu-settings package. I'm not sure where 01-network-manager-all.yaml comes from, but ubuntu-settings is removing it [1] (if the user didn't change it manually). So it's apparently some legacy stuff.

[1] - https://git.launchpad.net/ubuntu/+source/ubuntu-settings/tree/debian/ubuntu-settings.postinst#n11

Revision history for this message
Lukas Märdian (slyon) wrote :

/etc/netplan/01-network-manager-all.yaml is legacy stuff, installed by livecd-rootfs. Nowadays, it moved to /usr/lib/netplan/00-network-manager-all.yaml, provided by the "ubuntu-settings" package, as mentioned by Danilo.

So this bug is mostly about the installer side. I'm closing the Netplan bug task.

Changed in netplan.io (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.