Author Topic: Keeping WiFi passwords when changing to new Linux OS  (Read 8105 times)

0 Members and 1 Guest are viewing this topic.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #15 on: February 28, 2012, 12:55:17 pm »
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
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Toonman

  • Hero Member
  • *****
  • Posts: 904
  • Karma: 15
  • Freeing the World form the Microsoft scurge!
    • View Profile
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #16 on: February 28, 2012, 12:58:25 pm »
Thanks Mark.
Life is for living.  RIP Keith Floyd.   ;)

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #17 on: February 28, 2012, 01:15:00 pm »
Heh .. thank me when I've NOT forgotten to do it ;)

We are talking Ubuntu 10.04 --> PeppermintOS (Two) aren't we ?
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Toonman

  • Hero Member
  • *****
  • Posts: 904
  • Karma: 15
  • Freeing the World form the Microsoft scurge!
    • View Profile
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #18 on: February 28, 2012, 01:23:35 pm »
That's correct  Mark
Life is for living.  RIP Keith Floyd.   ;)

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #19 on: February 29, 2012, 12:12:24 pm »
Ignore this posting .. I'm just bumping the topic to keep it on the forum portal (front page), so I don't forget :)
« Last Edit: February 29, 2012, 12:14:03 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #20 on: March 01, 2012, 01:12:16 am »
OK, I *think* I've cracked it, but still want to test it in the VM.

I need to know if you have multiple user accounts on this system ?

It appears that if when you create the connection you select "Available to all users", the profile is stored in the:-
/etc/NetworkManager/system-connections
directory.

If you DON'T select "Available to all users", it gets stored as XML files in sub directories of:-
/home/<username>/.gconf/system/networking/connections

But apparently you can't copy that directory without stopping NetworkManager first.

So it would seem there are 2 ways of going about this

a) edit all profiles and select "Available to all users" .. then copy the /etc/NetworkManager/system-connections directory.
or
b) close down NetworkManager, then copy the /home/<username>/.gconf/system/networking/connections directory.

Leave it with me till tomorrow, I'll test it and work out which is easiest/best.



The following is just here for future reference:

Stop NetworkManager with -
Code: [Select]
sudo service network-manager stop
pkill nm-applet

Restart with -
Code: [Select]
sudo service network-manager start
then from the Alt+F2 dialog run
Code: [Select]
nm-applet --sm-disable
« Last Edit: March 01, 2012, 01:15:07 am by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Toonman

  • Hero Member
  • *****
  • Posts: 904
  • Karma: 15
  • Freeing the World form the Microsoft scurge!
    • View Profile
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #21 on: March 01, 2012, 07:00:13 am »
Ok.  I will wait and see what you come up with.
Life is for living.  RIP Keith Floyd.   ;)

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #22 on: March 01, 2012, 10:42:06 am »
Do you have multiple user accounts on this system ?
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Toonman

  • Hero Member
  • *****
  • Posts: 904
  • Karma: 15
  • Freeing the World form the Microsoft scurge!
    • View Profile
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #23 on: March 01, 2012, 10:46:47 am »
Sorry I meant to let you know.  No there is only me logging in and no other accounts.
Life is for living.  RIP Keith Floyd.   ;)

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #24 on: March 01, 2012, 12:45:43 pm »
Would you be happy to go into NetworkManager, select each profile one at a time, and tick the "Available to  all users" box then ?

Don't do it yet, just let me know if you'd be happy to do that.

That way they'd all be in one place so would make backing up easier, they'd also be in an 'easier to read' format.

[EDIT]

On a single user system, having the saved network profiles "Available to all users" would also have the benefit of .. lets say some of the desktop configs in your home folder ever became corrupt, so your desktop was unusable .. if you create a new user account (as a temporary fix) the network profiles will immediately be available to the new account.

Obviously on a multi-user system you may not want all the profiles available to every user, but on a sigle user system.........
« Last Edit: March 01, 2012, 12:53:23 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Toonman

  • Hero Member
  • *****
  • Posts: 904
  • Karma: 15
  • Freeing the World form the Microsoft scurge!
    • View Profile
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #25 on: March 01, 2012, 01:42:46 pm »
OK Mark. I will do that tomorrow afternoon.
Life is for living.  RIP Keith Floyd.   ;)

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #26 on: March 01, 2012, 01:53:45 pm »
NO DON'T .. just in case, do it ONLY to the connection you are using at the moment (preferably your home connection, or one you know the password to).

Once you've done it to that ONE connection, send the output from:
Code: [Select]
ls -a /etc/NetworkManager/system-connections

So we can check it went well.

In the end we'll probably backup BOTH directories anyway, just to play safe ;)
« Last Edit: March 01, 2012, 01:56:15 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Toonman

  • Hero Member
  • *****
  • Posts: 904
  • Karma: 15
  • Freeing the World form the Microsoft scurge!
    • View Profile
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #27 on: March 02, 2012, 06:55:56 am »
Ok.  will have a go later.  In the office this afternoon, I should find some time.
Life is for living.  RIP Keith Floyd.   ;)

Offline Toonman

  • Hero Member
  • *****
  • Posts: 904
  • Karma: 15
  • Freeing the World form the Microsoft scurge!
    • View Profile
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #28 on: March 02, 2012, 04:06:13 pm »
I'm probably not doing this right but here goes.....

toonman@toonman-laptop:/$ ls -a /etc/NetworkManager/system-connections
.  ..  Wired connection 1
toonman@toonman-laptop:/$

PS   I don't have Network manager as an icon only network connections, proxy's and network tools.
Life is for living.  RIP Keith Floyd.   ;)

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 18231
  • Karma: 476
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Keeping WiFi passwords when changing to new Linux OS
« Reply #29 on: March 02, 2012, 06:42:34 pm »
In your menus select Network Connections

Click the Wireless tab

In the list of displayed network profile names, highlight the connection you want to edit and click Edit

Enter your password if/when asked

Tick the little box marked "Available to all users"

Click the Save button.

Now open a terminal and send the output from:
Code: [Select]
ls -a /etc/NetworkManager/system-connections
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal