Keeping WiFi passwords when changing to new Linux OS

Ok. I am now considering moving to Peppermint from Ubuntu 10.04 on my Samsung NC10 netbook (1gb). I do not want to lose my WiFi passwords from work , Hotels etc. Can I back them up and import them into my new OS or not? Any suggestions welcome. :slight_smile:

Copy (as root) all the network profiles from:-

/etc/NetworManager/system-connections

To the same place on the Peppermint installation … done :slight_smile:

I’ve just tested it from Ubuntu 11.10 → PeppermintOS (Two) … the network profiles (complete with keys) were then available in NetworkManager in Peppermint.

[EDIT]

To backup the whole /etc/NetworkManager/system-connections directory on your Ubuntu box:

sudo tar -zcvf ~/system-connections.tar.gz /etc/NetworkManager/system-connections

You’ll then find a tarball called system-connections.tar.gz in your home directory.

Thanks Mark. :slight_smile:

Should I log in using su command for root or what?

Suggestions always welcome.

See the EDIT above.

Thanks…err where is it saved to? :-[

An archive called

system-connections.tar.gz

in your home directory.

Just opened it to check and got this…

[connection]
id=Wired connection 1
uuid=cf57626e-883d-43f3-98f6-9ba6cd9890f1
type=802-3-ethernet
autoconnect=true
timestamp=0

[ipv4]
method=auto
ignore-auto-routes=false
ignore-auto-dns=false
dhcp-send-hostname=false
never-default=false

[802-3-ethernet]
speed=0
duplex=full
auto-negotiate=true
mtu=0

[ipv6]
method=ignore
ignore-auto-routes=false
ignore-auto-dns=false
never-default=false

You just opened what ? … if you mean one of the files in the .tar.gz … I would have expected there to be more than 1 profile in there ?

What is the output from:

ls -l /etc/NetworkManager/system-connections

also post the output from:

tar -ztvf ~/system-connections.tar.gz

and which version of Ubuntu are you running ?

I just extracted it to see what was in it.

Ubuntu 10.04

Output1

Wired connection 1

Output 2

toonman@toonman-laptop:/$ tar -ztvf ~/system-connections.tar.gz
drwxr-xr-x root/root 0 2011-06-16 16:12 etc/NetworkManager/system-connections/
-rw------- root/root 392 2011-06-16 16:12 etc/NetworkManager/system-connections/Wired connection 1

Ahh, the wireless connections must be stored elsewhere on 10.04

What is the output from:

ls -l ~/.gconf/system/networking/connections

Here is the info’ you asked for Mark.

toonman@toonman-laptop:/$ ls -l ~/.gconf/system/networking/connections
total 188
drwx------ 7 toonman toonman 4096 2010-10-23 17:07 1
drwx------ 5 toonman toonman 4096 2011-02-07 13:42 10
drwx------ 4 toonman toonman 4096 2011-02-08 11:53 13
drwx------ 4 toonman toonman 4096 2011-02-23 09:37 14
drwx------ 5 toonman toonman 4096 2011-03-01 18:47 15
drwx------ 5 toonman toonman 4096 2011-03-01 18:48 16
drwx------ 5 toonman toonman 4096 2011-03-02 16:53 17
drwx------ 4 toonman toonman 4096 2011-03-23 09:42 18
drwx------ 4 toonman toonman 4096 2011-03-23 10:32 19
drwx------ 5 toonman toonman 4096 2010-11-18 12:21 2
drwx------ 5 toonman toonman 4096 2011-04-04 10:38 20
drwx------ 4 toonman toonman 4096 2011-04-07 14:29 21
drwx------ 4 toonman toonman 4096 2011-05-03 11:19 22
drwx------ 5 toonman toonman 4096 2011-05-17 17:35 23
drwx------ 5 toonman toonman 4096 2011-06-13 18:58 24
drwx------ 4 toonman toonman 4096 2011-06-13 18:59 25
drwx------ 5 toonman toonman 4096 2011-06-13 19:16 26
drwx------ 4 toonman toonman 4096 2011-06-14 16:46 27
drwx------ 4 toonman toonman 4096 2011-06-15 16:45 28
drwx------ 4 toonman toonman 4096 2011-06-16 16:14 29
drwx------ 4 toonman toonman 4096 2010-10-27 15:57 3
drwx------ 4 toonman toonman 4096 2011-06-17 12:48 30
drwx------ 4 toonman toonman 4096 2011-06-17 12:49 31
drwx------ 5 toonman toonman 4096 2011-08-16 21:08 32
drwx------ 4 toonman toonman 4096 2011-09-06 12:05 33
drwx------ 4 toonman toonman 4096 2011-09-13 07:29 34
drwx------ 4 toonman toonman 4096 2011-09-16 13:55 35
drwx------ 5 toonman toonman 4096 2011-10-19 19:52 36
drwx------ 4 toonman toonman 4096 2011-11-16 10:52 37
drwx------ 4 toonman toonman 4096 2011-11-28 14:49 38
drwx------ 4 toonman toonman 4096 2011-11-28 14:50 39
drwx------ 7 toonman toonman 4096 2010-11-17 15:48 4
drwx------ 4 toonman toonman 4096 2011-11-28 14:51 40
drwx------ 4 toonman toonman 4096 2011-11-28 14:51 41
drwx------ 4 toonman toonman 4096 2011-11-29 19:13 42
drwx------ 4 toonman toonman 4096 2011-12-01 17:26 43
drwx------ 5 toonman toonman 4096 2011-12-01 17:39 44
drwx------ 4 toonman toonman 4096 2011-12-04 14:47 45
drwx------ 4 toonman toonman 4096 2011-12-14 17:33 46
drwx------ 5 toonman toonman 4096 2011-12-16 16:27 47
drwx------ 5 toonman toonman 4096 2011-12-16 16:28 48
drwx------ 7 toonman toonman 4096 2012-02-21 12:27 49
drwx------ 6 toonman toonman 4096 2011-01-24 12:50 5
drwx------ 4 toonman toonman 4096 2012-02-16 17:19 50
drwx------ 4 toonman toonman 4096 2010-12-07 21:04 6
drwx------ 4 toonman toonman 4096 2010-12-09 13:13 7
drwx------ 4 toonman toonman 4096 2011-01-24 08:59 9
-rw------- 1 toonman toonman 0 2012-02-21 09:47 %gconf.xml
toonman@toonman-laptop:/$

Hmm … that’s weird, it seems to be full of directories that have numbers for names (1 - 50) … how many connections do you have saved ?

If you navigate to that directory:

nautilus ~/.gconf/system/networking/connections

Then open one of the directories there … what’s inside ?

One folder labeled 802-11-wireless
One folder labeled connection
and a file labeled %gconf.xml

OK, I’m pretty sure that’s the wireless profiles … BUT … as they seem to be in a different format to the way they are stored in Peppermint (or Ubuntu 11.10) I’m guessing they’ve things and t may be impossible to copy them from an earlier version ::slight_smile:

If you dig around it those folders, are there any files that look like they may be the stored profiles ?

That contain text similar to the one you found earlier ?

Here’s an example wireless profile from Peppermint (and Ubuntu 11.10):-

[connection] id=Auto PCNETSPEC uuid=a3e884c0-873f-4b25-b367-611fa805515d type=802-11-wireless timestamp=1329439232

[802-11-wireless]
ssid=PCNETSPEC
mode=infrastructure
seen-bssids=90:01:3b:5e:33:a8;
security=802-11-wireless-security

[802-11-wireless-security]
key-mgmt=wpa-psk
psk=XXXXXXXXXXXXXXXXXX

[ipv4]
method=manual
dns=172.16.0.1;
addresses1=172.16.0.4;16;172.16.0.1;

[ipv6]
method=ignore

If you still can’t find them, let me know and I’ll bung 10.04 in a VM and see if I can work it out … it was 10.04 you were thinking of upgrading from ?

I’m going to guess if you copied the whole ~/.gconf/system/networking/connections directory to the same place in Peppermint it would work, but I’ll test it in a VM if you need.

This is what is in ‘connection’

<?xml version="1.0"?> 802-11-wireless b06a6901-33eb-4917-8274-9c8b6e645df1 Auto DemoWireless connection

Hmm … if 10.04 stores them as xml files (without the password), maybe it can’t be done … but as I suggested, an upgrade would normally keep them, so maybe NetworManager can read BOTH formats.

I’ll test it later in a VM

Thanks Mark.

Heh … thank me when I’ve NOT forgotten to do it :wink:

We are talking Ubuntu 10.04 → PeppermintOS (Two) aren’t we ?

That’s correct Mark

Ignore this posting … I’m just bumping the topic to keep it on the forum portal (front page), so I don’t forget :slight_smile: