Re: Configure connection via command line

On Wednesday 14 of July 2010 13:25:37 Arlen Nascimento wrote:
> Hi, all
> I need to configure a wireless connection totally via command line. I will
> kill network manager, configure the access point, and after that i need
> that connection is available in network manager but without asking the
> password (that will be passed by means of a script or something).
> Is that possible?
> Best regards

You need to have a connection (profile) configured first. Then you can activate 
that by NetworkManager. You should use a system type connection since that is 
managed directly by NetworkManager and not GUI app like nm-applet. You can 
definitely create it from command line, e.g. via D-Bus (see or editing configuration files (depends on which plugin 
you use: RH ifcfg files, keyfile configurations in /etc/NetworkManager/system-
connections/, etc.).
However, the quickest way to configure a connection is to use nm-applet and 
just click on your AP's SSID. The connection will be created automatically for 
you; you provide the password and it will be stored, and thus you won't be 
asked for it later. Then you can switch the connection to be a system 
connection using nm-connection-editor and checking "Available to all users."
Now you have a connection you can activate any way you want. Use nmcli, some 
script employing D-Bus or just mark the connection to "autoconnect" and it 
will be activated automatically.


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