GNOME Bugzilla – Bug 645318
Enable nmcli to create new connections
Last modified: 2013-05-02 15:59:44 UTC
Currently (as of 0.8.x) nmcli can connect to known connections, but it can't create new connections. This is not compatible with the vision of running NetworkManager on headless machines, as one needs to install nm-applet in order to create a new connection. I can point to two examples of how to do it: the nm-applet code, and this how-to: http://trac.linexa.de/wiki/development/BootCD-booting#Createastaticnetworkmanagerfileforeth0
To some degree it was intended that if you want to do networking on headless machines, you would certainly be familiar with writing network config files yourself, since that's normally how headless machines are administered, and then you could use nmcli to activate that newly written connection. But it does seem there's interest in having nmcli make new connections though. (One problem is that since there's no process sitting around waiting to provide secrets to NetworkManager, all secrets in this case would have to be stored in the config files or connections would fail, since there's no way to prompt you for secrets when NM needs them automatically. On a desktop this functionality is provided by nm-applet or kde-plasma-networkmanagement.)
(In reply to comment #1) > To some degree it was intended that if you want to do networking on headless > machines, you would certainly be familiar with writing network config files > yourself, since that's normally how headless machines are administered, and > then you could use nmcli to activate that newly written connection. I'm trying out nmcli (dropped NM for wpa_supplicant/ifup/ifdown around Fedora 11 or so), but this is preventing me from using it full-time. I don't run headless machines, but I also don't use a system tray or a (non-system) DBus session (and either is silly, IMO, for one application I shouldn't touch too often). > But it does seem there's interest in having nmcli make new connections though. Indeed :) . > (One problem is that since there's no process sitting around waiting to provide > secrets to NetworkManager, all secrets in this case would have to be stored in > the config files or connections would fail, since there's no way to prompt you > for secrets when NM needs them automatically. On a desktop this functionality > is provided by nm-applet or kde-plasma-networkmanagement.) I'd rather the secrets be stored in my per-user directory than the system directory. Also, from what I recall of nm-applet and k-p-nm, they can store the secrets as well, so I don't see much issue there; nmcli just forces the secret to be in the config file(s).
Merging this bug report with a tracker for nmcli improvements that covers this topic, too. *** This bug has been marked as a duplicate of bug 682056 ***
NM bugzilla reorganization... sorry for the bug spam.