Silently Autosave Passwords In Firefox

Codrut Nistor November 9, 2009 47

The problem with a lot of Internet users is lack of any idea about password management, so if they get their computer replaced, they go as far as creating new Yahoo! or Gmail accounts simply because the previous credentials were saved into their browser, and they simply forgot any kind of info related to them. While this time won’t talk about password management itself, this is also a pretty interesting password-related subject: silently autosaving passwords in Firefox.

Autosave Passwords in Firefox

Obviously, allowing Firefox to save your user names and passwords won’t make any other noise apart from the mouse click needed, and this is exactly what I had in mind – saving passwords without asking a confirmation! Sure, the evil minds reading this could also use this Firefox hack to steal other people’s accounts… without actually stealing their passwords! :)

As a final addition to the last phrase above, I think it could be possible to retrieve those passwords already save with the help of some additional program, but I will be honest – I simply don’t care about that, and my advice is to stay away from other people’s account, all right? Good!

Now, let’s get to the hack itself, shall we? First of all, I have to thank Raymond for writing about this subject and giving me the idea of going after it, too. All the credits for hacking the .JS file I’ll tell you about next also go to him. Great job, Raymond!

If you really want to get rid of that bar having the Remember, Never for This Site and Not Now buttons, here’s what you should do after closing Firefox

Silently Autosave Passwords in Firefox Hack

1. Open a text editor (my favorite is Notepad++, as you can see in the image above)

2. Open the file nsLoginManagerPrompter.js, located in the components folder of your Firefox main directory (for example, default location should be C:\Program Files\Mozilla Firefox\components\)

3. Go to the _showSaveLoginNotification function and remove everything between lines 642 to 711, or until you find the _removeLoginNotifications funtion, if you’re going to use the Search feature instead of checking the line number…

4. Replace that section with these two lines of code:
var pwmgr = this._pwmgr;

5. Save the file and open Firefox.

That’s all, folks! Now, all your user names and passwords will be saved automatically, so be sure to use this feature carefully… and avoid using Firefox on public computers, since someone else could have done this and turned this notorious browser into some kind of keylogger! :|


  1. RETRVER December 9, 2009 at 6:09 pm - Reply

    Uh-oh…I followed direction but now see nothing in the saved passwords section of firefox? The auto-prompt box is gone but nothing is being saved??? Thanks.

  2. Adara January 20, 2010 at 8:08 pm - Reply

    I’m having the same problem as RETRVER. Nothing is being saved.

  3. Jen March 12, 2010 at 12:25 am - Reply

    I am getting this error and I have no idea why. If you could help me PLEASE!! Thank you in advance.

    Windows Script Host
    Script: C:\Program Files\Mozilla Firefox\components\nsLoginManagerPrompter.js
    Line: 39
    Char: 1
    Error: Syntax error
    Code: 800A03EA
    Source: Microsoft JScript compilation error


  4. sudharsan @ tricks tips March 12, 2010 at 11:26 pm - Reply

    But saving password in firefox will lead to Hacking when used by another person

  5. Smola March 31, 2010 at 7:05 pm - Reply

    cant find text : _removeLoginNotifications funtion

    and it is not between those lines??????? Any idea?? Thanks

  6. parth d master May 12, 2010 at 12:27 am - Reply

    i think its a difference of the firefox version……
    can u tell me which version is used in that photo..?!!?

  7. Codrut Nistor May 24, 2010 at 9:44 pm - Reply

    3.5.3, if I remember it well…

  8. tylorsch July 2, 2010 at 2:33 am - Reply

    it keeps telling me the save failed. That i need to check if its open in another program. When it’s not.

  9. evince November 29, 2010 at 9:01 pm - Reply

    can you tell the same hack on firefox 3.6 or greater

  10. jordannnn February 27, 2011 at 7:57 am - Reply

    i am having the same problem as Tylorsch. I can’t get it to save. HELPPPPPPP

  11. mohammed khalphan March 18, 2011 at 7:48 am - Reply

    i cant find ns loginmanager in components folder , teres only three files,binary manifest, browser comps.dll, nsiqtscriptableplugin.xpt , i’m using win7 & ff version 4.3 beta

  12. Joy basu March 18, 2011 at 10:32 pm - Reply

    i cannot find the line _showSaveLoginNotification by search, it shows the text not available. and also i tried to search by lines. there are no text that says “_showSaveLoginNotification”
    what to do? help please.

  13. Codrut Nistor March 19, 2011 at 5:58 pm - Reply

    In case you didn’t figure it out, this hack doesn’t seem to work in Firefox 4…

  14. 4 April 6, 2011 at 4:18 pm - Reply

    Ye this DONT work in firefox 4

  15. Guna April 22, 2011 at 2:07 pm - Reply

    Hey guys how to cancel the username & password auto complete after sign out ?

  16. hi May 8, 2011 at 4:30 pm - Reply

    guys, i just found out why the stuff arent there on notepad, you need the newest version of notepad, now it works for me.

  17. candy May 11, 2011 at 12:17 pm - Reply

    hi im really rubish with computors, im trying todo this saved password thing but i dont know where to find or go to get to
    C:\Program Files\Mozilla Firefox\components\. i know you have already posted so much info but please would you mind braking it down a bit more for me i would be so greatful thank you

  18. Codrut Nistor May 11, 2011 at 1:00 pm - Reply

    Oh, my… did you check at least the other comments? This doesn’t work with Firefox 4, unfortunately…

  19. Bast May 17, 2011 at 8:51 pm - Reply

    I cannot save the Notepad++ file once I changed it as you told us to do. It says “please check whether if this file is opened in another program”, I checked everywhere but it’s not. Could you please help me on that?

  20. Alien May 29, 2011 at 7:17 pm - Reply

    I do not even see this file named “nsLoginManagerPrompter.js” in the components folder !

  21. shaikh June 23, 2011 at 4:49 pm - Reply

    nothing shown in save password in password crompt

  22. DRON PAUDLE July 6, 2011 at 8:25 pm - Reply

    It doesn’t work baby, It’s bad idea just making me full

  23. mark August 16, 2011 at 8:26 pm - Reply

    i did it all but wont save says check and see if opened in another program nothing else is runnin

  24. winray September 2, 2011 at 6:57 am - Reply

    Really working wooo thanx mann

    • Robert September 4, 2011 at 7:46 pm - Reply

      how did you get it to save?

  25. Robert September 4, 2011 at 7:45 pm - Reply

    It says cant save bc its running in another program..but its NOT

  26. Ashish September 18, 2011 at 5:03 am - Reply

    oh! thank u so much @Codrut Nistor, its working

  27. Ashish September 20, 2011 at 3:52 am - Reply

    thank u so much its working @Codrut Nistor but i have a problem after logging out my password is still there
    can u please help me ??

  28. jayaraj September 20, 2011 at 8:50 am - Reply

    tell me the version of firefox works for this

    • Codrut Nistor September 20, 2011 at 3:21 pm - Reply

      Why don’t you just check the comments above? It has been said two or three times already – it doesn’t work from Firefox 4 upwards!!!

  29. Ashish September 20, 2011 at 6:01 pm - Reply

    its working
    but i have a problem after logging out my password is still there
    can u please help me ??

  30. Codrut Nistor September 20, 2011 at 6:19 pm - Reply

    That is a interesting problem, also had it some time ago. Try clearing all cached data – could work, but I can’t guarantee. Sometimes, Firefox works exactly the way it should not, without any logical explanation. :/

  31. raja September 23, 2011 at 7:47 am - Reply

    i could not save or replace this file nsLoginManagerPrompter.js after editing. it displays access is denied.what to do?
    thanks in advance:D

  32. tabby October 4, 2011 at 4:49 pm - Reply

    i cannot find any file named nsLoginManagerPrompter.js would you please help me
    my email is

  33. Larry October 19, 2011 at 5:56 pm - Reply

    Supposedly it does work for 4.x and beyond. It’s just farther down in the file than it was before. The url below is just one spot I found it so far, there’s a few others.

  34. Confusion December 4, 2011 at 9:44 pm - Reply

    I have followed the steps and the “Do you want to save?” Is now gone, however when I checked the saved password it is not saved. Is there anything that I am not doing correctly? (I am running 3.5.4 and tried with a previous lower version which didn’t work either)

  35. rsvns December 27, 2011 at 8:44 am - Reply

    I cant find this file in windows…
    Plz help me…

    C:\Program Files\Mozilla Firefox\components\nsLoginManagerPrompter.js

  36. Buddy4u December 27, 2011 at 1:10 pm - Reply

    Hi, thanks for this. But it seems not working. As per i see its the same problem with everyone. It keep on saying save failed. File is running. Plz help me if anyone can. What version is best for this?

  37. Feras Jobeir January 6, 2012 at 11:26 pm - Reply

    Hello :)

    I am using Firefox 9.0.1, and “nsLoginManager.js” is not in the mentioned directory, you may find it here:
    1) go to “C:\Program Files\Mozilla Firefox”
    2) unzip the file “omni.jar” (I used winrar to do this), and I think it is recommended to extract it to “omni” as folder so you don’t replace any of your files.
    3) go to “C:\Program Files\Mozilla Firefox\omni\components” then look at “nsLoginManager.js”, and edit as you like.
    4) compress the content of “omni” folder as a jar file
    5) rename it to “omni.jar”
    6) replace the old “omni.jar” with the new one.

    done :)

  38. mike January 21, 2012 at 1:48 pm - Reply

    does this work for fire fox 9.01

    • Codrut Nistor January 24, 2012 at 9:01 am - Reply

      It has been said a few times already – it doesn’t work for anything from 4.x above!!!

  39. DMC March 12, 2012 at 11:36 pm - Reply

    So,the answer is very simple.Everybody deleted the 712 line,MUST NOT DELETE THIS : }, and EVERYTHING WILL WORK CORRECTLY!Good Luck!

  40. sam78 March 31, 2012 at 3:20 pm - Reply

    i have firefox 3.6 but i can trove nsLoginManager.js in components. I take this file from internet,i have modifing it following the istruction,but it doesn’t work…please help me!
    sorry for my english,but i’m italian :-(

  41. jowani April 15, 2012 at 8:30 am - Reply

    i can’t find line “showSaveLoginNotification function and remove everything between lines 642 to 711, or until you find the _removeLoginNotifications funtion”in notepad++ v 6.1. pls help me.

  42. absy April 19, 2012 at 9:31 pm - Reply

    How could i set the password auto save without prompting the master password when the master password is set. Now its always asking the master password.

  43. denied April 20, 2012 at 4:52 am - Reply

    I downloaded version 3.5.3 and edited the code, but I get an access denied message when I try to save the file… any ideas?

  44. peter August 10, 2012 at 9:30 pm - Reply

    The directory is only stopping at components. and that’s where i stop.

Leave A Response »