I will be house sitting for a friend this weekend, and she has texted me her WiFi SSID along with its password. Incidentally, her preemptively texting me the WiFi details got me thinking:
Instead of connecting to her network when I get there, I should just store the WiFi credentials on my laptop (with Ubuntu 19.10) and phone (with Android 10). That way, my laptop and phone can connect to her WiFi network automatically!
So, I did some research and saw that it might be possible (at least for my laptop; I think on Android, I would need root access), but there are still some remaining questions.
From my research, for Ubuntu 19.10, it seems that network credentials are stored in the following directory:
, and each file represents a credential. For example, one particular connection I have in that folder,
etaoin-shrdlu, has the following contents:
$ sudo cat /etc/NetworkManager/system-connections/etaoin-shrdlu.nmconnection [connection] id=etaoin-shrdlu uuid=515ab528-986b-4bb8-97fe-f744beaa0f2f type=wifi interface-name=wlp3s0 permissions= [wifi] mac-address-blacklist= mode=infrastructure ssid=etaoin-shrdlu [wifi-security] auth-alg=open key-mgmt=wpa-psk psk=nice try hackers [ipv4] dns-search= method=auto [ipv6] addr-gen-mode=stable-privacy dns-search= method=auto [proxy]
This file seems relatively straightforward i.e. it looks like the only things I need to change are:
- The file name.
uuidvalue (from reading online, this can be randomly generated).
Presumably, the key management scheme to be used will be
Additionally, I discovered that there is one more file that seems to partake in this ceremony:
, which has the following configuration:
$ sudo cat /run/NetworkManager/devices/3 [device] managed=true connection-uuid=515ab528-986b-4bb8-97fe-f744beaa0f2f route-metric-default-effective=600
, where the
connection-uuid is the same
uuid as the one specified in the
Testing It Out
So, this is what I tried:
- Forget the network
- Toggle airplane mode on.
- Create the following file
/etc/NetworkManager/system-connections/etaoin-shrdlu.nmconnection(it was previously deleted after forgetting the network).
- Place into the file the same contents of the previous
- Modify the previous version of
/run/NetworkManager/devices/3to have a
- Toggle airplane mode off.
- Wait and hope that it worked...
And the result? It doesn't work.
- What am I getting wrong?
- What is the
uuidkey used for? Why is it OK for it to be randomly generated?
- Does the value for the
pskkey have any limitations for allowed characters?