firefox: remember passwords for all sites

When logging in on some websites, these sites don't offer (I suspect intentionally) to remember passwords. This happens not only on public websites, but also in my intranet (remote web consoles, Dell DRAC, ...) and it is extremely annoying to having to type the login details each time.

Is it possible somehow, to force a particular website (Firefox) to remember the username and password ?

NOTE: In my firefox, I have "remember password for sites" selected, and "Exceptions" is empty.


You might want to consider a solution such as Keypass.

You can use the auto-type feature enabling you to have Keypass type logins and passwords on you behalf, in a secure fashion (without keyloggers being able to log what you typed).

It is also very valuable in that it constitues a safe lock for all your passwords. In my opinion, it is always good to have your passwords not stored in your browser (also enabling you to get a bit more privacy by emptying all private data, cookies and so on when you close your browser).

On top of this it is not browser-specific so you could use it to store and enter your passwords for about every GUI-based application (eg. Thunderbird etc).

If you are on Linux, you can check the excellent KeepassX.

I have been using KeepassX for a while and it has saved my left wrist for a thousands of repetitive Ctrl + C, Ctrl + V...


For Firefox and other browsers, there is Lastpass. I use it for websites as well as for example the login into my local router. It's secure because it allows to easily have distinct, long, random passwords on every website.

It securely stores all the passwords locally in an encrypted BLOB somewhere (with the possibility to sycronise the BLOB with other PC's of yours). To access the stored passwords, you provide a single "master password". You can define how often the master password is queried.

To learn more see this official video from Lastpass on YouTube.

It's internals are covered by Steve Gibson from GRC in episode 256 of the "Security Now" podcast series.


Firefox does not work in the way you want it to work. You aren't getting an answer that says what you want because that answer does not exist.

The Password Manager in Firefox will respect individual sites' requests to disallow password remembrance. In the Password Manager (Firefox > Options > Security tab > Saved Passwords), you have the ability to remove passwords, but not add passwords.

Without any Add-Ons, there is only one way to add passwords to the Password Manager in Firefox: wait for the prompt while you are logging in, and select to remember the password. This prompt can be disabled in Firefox by adding an Exception to the Password Manager or at the request of the website itself. Most notably, Gmail, Hotmail, and Yahoo have all written code to prevent passwords from being remembered on their sites.

There are JavaScript commands that can be run in Firefox to attempt to override the "do not remember passwords" request from the website. These scripts, provided below from squarefree.com, can be bookmarked, and work to varying degrees of success depending on the website you are using. Just know that the scripts, while good, cannot reliably override this function in every case. Programmers willing enough and smart enough will be able to prevent you from saving passwords.

That said, try bookmarking the scripts below. They currently work in most situations. They need to be run before you submit your ID / password.

With feedback:

javascript:(function(){var ca,cea,cs,df,dfe,i,j,x,y;function n(i,what){return i+" "+what+((i==1)?"":"s")}ca=cea=cs=0;df=document.forms;for(i=0;i<df.length;++i){x=df[i];dfe=x.elements;if(x.onsubmit){x.onsubmit="";++cs;}if(x.attributes["autocomplete"]){x.attributes["autocomplete"].value="on";++ca;}for(j=0;j<dfe.length;++j){y=dfe[j];if(y.attributes["autocomplete"]){y.attributes["autocomplete"].value="on";++cea;}}}alert("Removed autocomplete=off from:\n"+n(ca,"form")+"\n"+n(cea,"form element")+"\n\nRemoved onsubmit from:\n"+n(cs,"form")+"\n\nAfter you type your password and submit the form, the browser will offer to remember your password.")})();

Without feedback (no pop-up):

javascript:(function(){function R(w){try{var a,df,dfe,i,j,x,y,r=1;df=w.document.forms;for(i=0;x=df[i];++i){dfe=x.elements;if(a=x.onsubmit){a=""}if(a=x.attributes["autocomplete"]){a.value="on"}for(j=0;y=dfe[j];++j){if(a=y.attributes["autocomplete"]){a.value="on"}}}}catch(E){r=0}return r}R(self);var i,x;for(i=0;x=frames[i];++i)R(x)})(); 

Without feedback unless you run it twice:

javascript:(function(){var c=0;function R(w){try{var a,df,dfe,i,j,x,y,r=1;df=w.document.forms;for(i=0;x=df[i];++i){dfe=x.elements;if(a=x.onsubmit){a=""}if(a=x.attributes["autocomplete"]){if(a.value=="on"){c++}a.value="on"}for(j=0;y=dfe[j];++j){if(a=y.attributes["autocomplete"]){if(a.value=="on"){c++}a.value="on"}}}}catch(E){r=0}return r}R(self);var i,x;for(i=0;x=frames[i];++i)R(x);if(c){alert("Found: "+c)}})(); 

The other option is to use an AddOn for Firefox, like the ones mentioned in the other answers.


This happens because the forms or form fields have autocomplete disabled. Password saving is a form of autocomplete, and if the website owners don't want autocomplete or password/username saving, they can use the autocomplete attribute and set it to false for the elements. So in a sense it's the website owner's fault.

LastPass, Keepass, RememberPass or Autofill Forms can be used to bypass this.

The scripts in @philipthegreat's answer ought to work as well.

I agree that this behavior may not always be desirable, so I have submitted a bug report and patch for review.

Update: The bug report has been redirected to an earlier one, but the patch has passed review and after a secondary check it will probably get pushed.