As a learning experiment, I'm trying to turn Ubuntu Desktop into a server. I was able to disable X at boot time and now, I am trying to get my computer to connect to my WiFi network at boot time, before any user logs in. That way, I won't have to be physically near my computer every time it reboots. I've set up the WiFi connection using the Network Manager if that can help somehow (would be nice not having to reconfigure it again!).
I found out how to do it :) Simply go into Network Manager > Edit Connections. Select your connection, click Edit and check Available to all users.
You may also need to add a line for each interface that you want to automatically come up at boot time in
auto eth0 auto wifi0
If you are using Ubuntu 16.x, navigate to
/etc/NetworkManager/system-connections/. There you will find a file with the same name as your wireless network. This file contains your wifi credentials and settings. Edit it, find the line with
permission=, and remove everything after the
= sign (or the whole line).
Restart and you can connect before login.
dhaupin's solution solved my problem with minor modifications:
/etc/NetworkManager/system-connections/ file did not have a
permission= line. But it did have a
psk-flags=1 line. Commenting it out and adding a
psk="MyWifiPassword" line fixed the Network-Mangler problem.
Rebooted and it came up online without logging in.