5

I have a strange scenario over here: If I run nmcli dev wifi list it shows me a list of all networks which is fine. As soon as I add the device (wlan0 in my case) to the /etc/network/interfaces file and reboot it shows no networks.

So before reboot the /etc/network/interfaces contains:

#iface wlan0 inet manual
#  wpa-driver wext
#  wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
# wpa_supplicant.conf contains no networks at the moment

source-directory /etc/network/interfaces.d
# this directory is empty, so currently it is a redundant statement

I remove the first three #, reboot the device and nmcli shows no networks. How do I address this issue? I need the wpa_supplicant.conf empty because it will be filled by a script. Said script displays a list of networks (via nmcli) and generates a wpa_supplicant.conf (via wpa_passphrase)

I'm aware there is a similar question over there, but the only answer to start the wpa_supplicant.service won't fix my issue, as the service is already running (according to # systemctl status wpa_supplicant.service). Restarting it does not change anything either.

2 Answers 2

11

This is normal. The NetworkManager don't manages devices in /etc/network/interfaces by default. You can change it in /etc/NetworkManager/NetworkManager.conf key [ifupdown] managed=true

1
  • Just tried it, it was exactly the solution to my problem. Thanks :)
    – DBX12
    Commented Jan 3, 2017 at 9:56
0

Note that on recent Ubuntu versions (which ones?) there is a thing called Netplan who do not talk with NetworkManager as default and that could also be the cause of similar errors.

In that case, as fix:

sudo mv /etc/netplan/00-installer-config.yaml /etc/netplan/00-installer-config.yaml.bak

sudo nano /etc/netplan/00-activate-networkmanager.yaml

And in the file write this content:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
# Set and change netplan renderer to NetworkManager GUI tool
network:
  version: 2
  renderer: NetworkManager

Then:

sudo netplan apply

Then since I don't have much knowledge about Netplan I just suggest a reboot and nmcli should then be OK.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .