Re: Storing the WEP key outside user's keyring



Marcin 'Qrczak' Kowalczyk wrote:
> 2008/10/3 Robert Piasek <robert piasek co uk>:
>
>   
>> You can use keyfile plugin and define your system wide connection. That way
>> NM will activate during boot.
>>     
>
> How do do that? Where is the documentation?
>
>   

I couldn't find a good documentation about it either, so manual files
inspection and harassing Dan helped me :)
(if you check the list, you might find some old emails about it)


1) I'm using distros which don't have "native" plugin so keyfile is the
only option for system wide settings  (Gentoo, Exherbo and Openmoko)

2) Create a file /etc/NetworkManager/nm-system-settings.conf as follow:
[main]
plugins=keyfile

3) use policykit to grant yourself rights to save system wide config
(Needed only if you want to save your settings using nm-applet):

polkit-auth --grant
org.freedesktop.network-manager-settings.system.modify "USERNAME"

4) if you have X, go to nm-applet and save your configuration as system
wide settings.
If not you need to manually create files for each connection:

example for ethernet:
This config is for g_ether usb gadged and is activated when you
connect usb phone.
(please note the mac address line)

cat /etc/NetworkManager/system-connections/Neo

[connection]
id=Neo
uuid=17f8655e-3591-493e-aaf2-a84ac98c35aa
type=802-3-ethernet
autoconnect=true
timestamp=0

[802-3-ethernet]
speed=0
duplex=full
auto-negotiate=true
mac-address=0;27;17;27;8;24;
mtu=0

[ipv4]
method=manual
addresses1=192.168.0.200;24;0.0.0.0;
ignore-auto-routes=false
ignore-auto-dns=false



example for WPA-PSK network (SSID=dagger)
I've changed my psk line with random stuff:

cat /etc/NetworkManager/system-connections/dagger
[802-11-wireless-security]
key-mgmt=wpa-psk
wep-tx-keyidx=0
proto=wpa;rsn;
pairwise=tkip;ccmp;
group=wep40;wep104;tkip;ccmp;
psk=3924a30eb311c59650cf9e31ac27a5ea3f8497c90424a0a48ba60d8b9498a54a

[connection]
id=Auto dagger
uuid=e300c302-1737-4e08-ac0f-2dbf1edc7944
type=802-11-wireless
autoconnect=true
timestamp=1219387985

[802-11-wireless]
ssid=100;97;103;103;101;114;
mode=infrastructure
channel=0
rate=0
tx-power=0
mtu=0
seen-bssids=00:1c:10:e9:50:b8;
security=802-11-wireless-security

[ipv4]
method=auto
ignore-auto-routes=false
ignore-auto-dns=false


The tricky part for me was the SSID. Well you should get the point by
now. Most options are very similar to wpa_supplicant.conf, so shouldn't
be hard to convert it.
If you wont be able to create a plugin file yourself, drop me an email
outside the list with your settings and I will create one for you.


I hope that helps.

Rob


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