After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 645318 - Enable nmcli to create new connections
Enable nmcli to create new connections
Status: RESOLVED DUPLICATE of bug 682056
Product: NetworkManager
Classification: Platform
Component: nmcli
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks:
 
 
Reported: 2011-03-20 18:05 UTC by Leonardo Ferreira Fontenelle
Modified: 2013-05-02 15:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Leonardo Ferreira Fontenelle 2011-03-20 18:05:34 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
Comment 1 Dan Williams 2011-03-25 22:18:03 UTC
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.)
Comment 2 Ben Boeckel 2011-05-19 16:01:05 UTC
(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).
Comment 3 Pavel Simerda 2012-08-17 00:25:07 UTC
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 ***
Comment 4 Dan Winship 2013-05-02 15:59:44 UTC
NM bugzilla reorganization... sorry for the bug spam.