I wanted to switch from Windows to Linux. Was searching for options to export my Mozilla passwords. Have gathered a couple of links here
Option 1 :
In Mozilla firefox, goto Tools->Error Console and then copy and paste the following code into it. All the passwrods are exported in
[javascript]
(function(){
function twodigits(string) {return (string.length < 2) ? “0” + string : string ;}
function fourdigits(number){return (number < 1000) ? number + 1900 : number;}
var now = new Date();
var hours = twodigits(now.getHours() + “”) ;
var minutes = twodigits(now.getMinutes() + “”) ;
var seconds = twodigits(now.getSeconds() + “”) ;
var timeValue = ” | At ” + hours + “:” + minutes + “:” + seconds;
var days = new Array(“Sunday”,”Monday”,”Tuesday”,”Wednesday”,”Thursday”,”Friday”,”Saturday”);
var months = new Array(“January”,”February”,”March”,”April”,”May”,”June”,”July”,”August”,”September”,”October”,”November”,”December”);
var date = ((now.getDate()<10) ? “0” : “”)+ now.getDate();
var today = “On ” + days[now.getDay()] + “, ” + date + ” ” + months[now.getMonth()] + ” ” + (fourdigits(now.getYear())) + timeValue ;
var Cc = Components.classes;
var Ci = Components.interfaces;
netscape.security.PrivilegeManager.enablePrivilege(“UniversalXPConnect”);
var tokendb = Cc[“@mozilla.org/security/pk11tokendb;1”]
.createInstance(Ci.nsIPK11TokenDB);
var token = tokendb.getInternalKeyToken();
try { token.login(true);} catch (e) {}
if (token.isLoggedIn()) {
var passwordmanager = Cc[“@mozilla.org/login-manager;1″]
.getService(Ci.nsILoginManager);
var names=””,signons = passwordmanager.getAllLogins({});
for (i=0;i<signons.length;i++) {
try {
var host = signons[i].hostname;
var realm = signons[i].httpRealm;
var user = signons[i].username;
var userf = signons[i].usernameField;
var password = signons[i].password;
var passwordf = signons[i].passwordField;
var submiturl = signons[i].formSubmitURL;
if (user == “”){ user = “<br>”; }
names+=” <tr>n <td> ” + host + ” </td>n <td> ” + user + ” </td>n <td> ” + password + ” </td>n <td> ” + submiturl + ” </td>n </tr>n”;
} catch(e) {}
}
void(window.open(‘data:text/html,
<html><head>
<meta http-equiv=content-type” content=”text/html; charset=ISO-8859-1″>
<title>Exported Mozilla Passwords</title>
<style type=”text/css”>
td {
font-family: “Trebuchet MS”, Arial, Helvetica, Geneva, Verdana, Sans-Serif;
font-size: 85%;
padding: 1px 2px 1px 2px;
}
</style>
</head><body style=”margin: 1em 3em; background-color: rgb(0, 126, 255);”>
<b>MOZILLA PASSWORD INFORMATION</b>
<p>Produced by <i>Pasting Code in the “Tools > Error Console: Code field”</i> ‘+today+
‘</p><p>
<table style=”empty-cells: show; background-color: rgb(231, 240, 249);” border=”1″ cellspacing=”0″>
<tbody><tr style=”background-color: rgb(77, 138, 212);”>
<td>
<b>Host</b>
</td>
<td>
<b>User name</b>
</td>
<td>
<b>Password</b>
</td>
<td>
<b>Submit URL</b>
</td>
</tr>’+names+'</tbody></table>
</p></body></html>’,””,”menubar=yes,resizable=yes,scrollbars=yes,width=1000,height:600″));
}
})();
[/javascript]
Option 2 :
Use password exporter plugin . Firefox Password Exporter exports the passwords to an XML
or CSV file with the option to encrypt them to increase security. (The
file can still be imported to Firefox where all passwords are visible)
The very same file
can then be used on another computer to import the passwords into
Firefox. All websites saved this way can be accessed without having to
remember the password.
Option 3 :
Use the Firefox Environment Backup Extension to export the whole firefox envireonment
Option 4 :
Copy your complete profile folder or the relevant parts of it into the Linux’s Mozilla profile folder