Re: Can I manually edit /etc/NetworkManager/system-connections/*



On Thu, 2014-09-25 at 21:02 -0500, Justin Brown wrote:
There's no problem with editing those files, but they need to be owned
root:root and 600 permissions. 


Use `nmcli con reload` to load the files after you create/modify them.
Then, nmcli con <con_name> up to activate. This was a recent change to
NM to not autoload modifications.


You could look at using nmcli to create the connections, but it's
basically no different than writing the keyfiles yourself. There is an
integrated editor to nmcli and a separate curses application, nmtui,
if you want something more interactive for your users.


I think nmcli/nmtui is great for CLI (at least with NM version >=
0.9.9).

And for CLI/scripting I also would strongly prefer nmcli over editing
configuration by hand/script.

YMMV


Thomas



Dan's blog
post, http://blogs.gnome.org/dcbw/2014/06/20/well-build-a-dream-house-of-net/, covers some of these 
features. 


/Justin

On Thu, Sep 25, 2014 at 8:52 PM, Ravi Parimi <rparimi gmail com>
wrote:
        Forgive me if this is a FAQ or has already been answered
        elsewhere. I
        read through a few man pages and searched the archives but
        didn't find
        anything related to my question.
        
        I'm trying to provide a text-based user interface to a linux
        system
        wherein a user will enter IP address settings that need to be
        configured on the host. I later convert this data into
        NetworkManager-friendly format and write it directly to
        /etc/NetworkManager/system-connections/eth0.
        
        For e.g I convert the user-input data for static IP settings
        into:
        
        [ipv4]
        method=manual
        addresses1=10.10.24.16/16,10.10.0.1
        dns=10.12.0.254
        
        On my jessie/sid debian, these settings take effect soon after
        I write
        the file. However, the same procedure doesn't work on Ubuntu
        14.04.1.
        Is there an additional step (such as send SIGHUP to
        network-manager
        etc.) that is needed for NM to apply the settings?
        
        Is this method of directly editing the file under
        system-connections
        recommended/correct? If not, what is the best way of applying
        changes
        via the CLI?
        
        Thanks!
        _______________________________________________
        networkmanager-list mailing list
        networkmanager-list gnome org
        https://mail.gnome.org/mailman/listinfo/networkmanager-list


_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]