This could be a FAQ: after an upgrade, my Ubuntu installation is missing all network connections and I’ve to waste half a day trying to restore them…
It’s nothing that I can’t reconstruct, since I keep track of all the network credentials (wi-fi shared keys, VPN passwords…) also in my favourite password manager application, but the whole problem is very disturbing and occurs relatively often. This time was during the update from version 14.04 LTS to version 16.04.1 LTS. 😦
I’m writing here some info for future reference and to help people who could have the same issue in the future. I can’t say what’s the root cause (I suspect there’re many) and for the same reason I don’t have a silver-bullet solution.
Ubuntu stores network connections the following directory:
/etc/NetworkManager/system-connections/
Each connection has its file, readable only by root (note: the files must be readable only by root – permissions 600, otherwise the Network Manager applet won’t find them).
Network interfaces definitions are stored in this file:
/etc/network/interfaces
Thanks to this article, I found that
“Since Ubuntu uses Network Manager to manage network connections, any definition listed in this file will automatically override it”.
Note that the same hint is written also in the Network Manager official documentation (see the “Issue” section).
So, given that my interfaces file had the following content:
auto lo iface lo inet loopback
I changed it to:
auto lo
And that’s all. After a reboot the connections were back!