MozillaZine


manually add site to Password Manager

User Help for Mozilla Firefox
cemc
Guest
 

Post Posted June 22nd, 2012, 12:47 am

Hi

I have Firefox 13 on Ubuntu 10.04. I would like to manually add a site, with username and password to the Password Manager, by editing/inserting entries to key3.db and signons.sqlite files, so when I open firefox and go to that page, the user and password are automatically inserted. I want to emphasize that I don't want to use any GUI tool, I would need a command-line solution, which can be scripted. Is there a quick way to do that?

Thanks!

RobertJ
Moderator

User avatar
 
Posts: 10874
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post Posted June 22nd, 2012, 8:15 am

No.
FF 84.0.1 - TB 78.6 - Mac OSX 10.13.6

cemc
Guest
 

Post Posted June 22nd, 2012, 11:25 am

And a slower way maybe? :) One file is sqlite, the other some BerkeleyDB, both can be read in say Perl or something. Can the encrypted user/password strings be generated and inserted? Is there a doc somewhere on the format and fields of these database files?

RobertJ
Moderator

User avatar
 
Posts: 10874
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post Posted June 22nd, 2012, 12:19 pm

.
I may have spoken too quickly. Firefox stores your password data in two files: key3.db (Master Password / Encryption key) and a signons.sqlite file (encrypted names and passwords). From poking around I think that if you don't set a master password the signons.sqlite stores passwords in Base 64 encoding. If this is true you should be able to add to the signons.sqlite data base using something like SQLite Manager. If you look at this Password Exporter, the developer seems to have a lot of knowledge re exporting/importing passwords. You might check his web site which has an email link to contact him.

.
FF 84.0.1 - TB 78.6 - Mac OSX 10.13.6

the_new_guy
 
Posts: 35
Joined: April 23rd, 2012, 2:24 pm

Post Posted June 22nd, 2012, 3:42 pm

cemc wrote:Hi

I have Firefox 13 on Ubuntu 10.04. I would like to manually add a site, with username and password to the Password Manager, by editing/inserting entries to key3.db and signons.sqlite files, so when I open firefox and go to that page, the user and password are automatically inserted. I want to emphasize that I don't want to use any GUI tool, I would need a command-line solution, which can be scripted. Is there a quick way to do that?

Thanks!

Yes there is, Saved Password Editor should be able to do the job.

cemc
Guest
 

Post Posted June 24th, 2012, 1:06 am

RobertJ, thanks for the tip, I've sent an email to him. I'll post here if I get the solution.

the_new_guy, thanks but I emphasized I need a command-line solution not a GUI one.

diesmo
 
Posts: 2
Joined: May 31st, 2012, 2:52 am

Post Posted June 29th, 2012, 9:20 am

Hi,

Using sqlite3.exe, i can edit the signons.sqlite, and run this :
INSERT INTO moz_logins(hostname, httpRealm, encryptedUsername, encryptedPassword, encType, usernameField, passwordField, guid)
VALUES('moz-proxy://1.2.3.4:3126', 'Squid proxy-caching web server', '~USERNAME_IN_BASE64', '~PASS_IN_BASE64', 0, '', '', '{SOME_RANDOM_GUID}');

to determine the right hostname and httpRealm, you can enter the username and password, and select what was entered in moz_logins.
the ~ before the username and password are not optional when encryption is off (encType=0).

Tested on firefox 3 to add login/password for proxy, i hope this helps.

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 4 guests