Your passwords are stored in
~/.gnome2/keyrings. By default, they are protected with your login password. If you copy that folder to your new system and use the same login password, then you should have all of your passwords, including your wifi connections.
You can see your passwords in the Passwords and Encryption Keys application. They should be under a keyring called
login. You can search for "Network secret" to show only wifi passwords.
mv ~/.gnome2/keyrings ~/old_keyrings
cp ~/backup/keyrings ~/.gnome2/keyrings
However, for network manager to use your password, it needs a gconf setting with a matching id number. You can do this two ways: copy your old gconf settings or create new connections and change their id numbers.
Copy your old gconf settings
This is really simple:
# network-manager will overwrite your changes if you don't terminate it
sudo stop network-manager
# back up old settings
mv ~/.gconf/system/networking/connections ~/old_connections
cp /media/old_install/.gconf/system/networking/connections ~/.gconf/system/networking/connections
sudo start network-manager
Unfortunately, this method didn't work for me. My test case is abnormal, so hopefully it works for you.
Create new connections
If the above doesn't work for you, then on your old machine:
- open Passwords and Encryption Keys
- right click on your default keychain
- select change password
- set the password to blank
- copy the ~/.gnome2/keyrings/default.keyring to ~/old_passwords.keyring
- Now you can connect to networks and look up passwords in ~/old_passwords.keyring (since you removed the password, it will be a plain-text file).
(You could also create connections and modify their uuid to match the existing password, but that's too much work unless you can script it.)