This is a mirror of http://burntelectrons.org/moz/moz-passwords.html (please visit this
site for the latest and greatest version of this document)
Mozilla Password Manager Tricks
Sections: Password
Recovery Method, Importing
a Password File, Revealing
a Password
Password Recovery Method
Mozilla's Password Manager is a great tool for logging into dozens
of websites without drowning in Post-It Notes, or using one password
everywhere. Sometimes, however, you have a lot of passwords in there,
and for one reason or another, you need to create a new profile, and
wish to take your passwords with you. What do you do? Here's a simple
way to recover them.
- Locate your profile directory. For the 3 major OSes, they're
located in the following locations:
- Linux: ~/.mozilla/[Mozilla Profile Name]/[random
string].slt/
- Mac OS X ~/Library/Mozilla/Profiles/[Profile
Name]/[random string].slt/
- Windows 2000, XP: C:\Documents and Settings\[Windows
Login Name]\Application Data\Mozilla\Profiles\[Mozilla Profile
Name]\[random string].slt\
- Windows 95, 98, ME*: C:\Windows\Application
Data\Mozilla\Profiles\[Profile Name]\[random string].slt\
*This may vary slightly, Win95 may not have an
"Application Data" folder, Win95 and 98 may or may not use the
"Profiles" folder.
- In your profile directory, there will be a file with a string of
numbers for the name, with a .s extension, such as 91453348.s.
This is the file containing your login information. Open it in a text
editor. There will be a block of text like so:
http://bugzilla.mozilla.org
Bugzilla_login
~ZW1haWxhZHJlc3NAZG9tYWluLmNvbQ==
*Bugzilla_password
~UGFzc3dvcmQ=
.
The top line is the URL where the information that follows
belongs. The second line is the name of the username field. The third
line is the username information, encoded in Base64. The fourth line is
the name of the password field. The fifth line is the password data,
also encoded in Base64. The final line is a period, which tells Mozilla
that it has reached the end of stored information for that website, it
is just a separator.
- In this example, the third and fifth lines are what we want. Copy
them, and remove the ~ at the beginning of each. Then you can copy them
into the form below to decode them. This will give you the username and
password stored in your password file.
Importing a Password File
Would you rather just bring your old profile's password file into a
new profile? Too many passwords to do one by one? Fear not, you can
import your old passwordfile into the new profile with just a few
simple steps.
- Locate your profile directory, just like above.
- Again, find the [random string].s file, like in Step 2 above.
Write down the filename exactly as it appears.
- Copy that file to your new profile's directory.
- While Mozilla is not running (including Quick Launch),
open the prefs.js file in your new profile directory in any
text editor.
- Find the following string in the file using your text editor's Search
function:
You should have found a line that looks like the following:
- user_pref("signon.SignonFileName", "91453348.s");
- Change the number in that line to match the number of the
filename you wrote down from Step 2.
- Save your changes, and exit. You're done.
Now Mozilla will have all your old passwords stored again.
Revealing Passwords in a Web
Login Form
Mozilla filling in all those passwords automatically can lead to a
person forgetting what those passwords were to begin with. There's an
easy way to see them without resorting to the in-depth methods above
(which is really just intended for saving multiple paswords from al old
profile). It's called a Bookmarklet. Bookmarklets
are just like regular bookmarks, in that they fit right in with all
your regular bookmarks, but they're not just a link to a page. They're
a tiny bit of JavaScript that can perform an action on the current
page. Jesse Ruderman has created most of my favorite Bookmarklets,
which can be found here.
When I was in the middle of writing a bookmarklet to show you
passwords in a form, I found out he'd already written a better
one. You can right click on the link View Passwords and select "Bookmark This
Link" to add it to your Bookmarks, or drag it to your Personal Toolbar
or Bookmarks menu. Then, whenever confronted with a form with a
password field, click the Bookmark it creates, and it will reveal to
you the contents of the password field.