How to make firefox ask for master password only when trying to show passwords

Finally I found a good workaround on this, using the Master Password+ Firefox Add-on.

This add-on provides several options, one of them being "Block master password prompts". In case the master password is required, the Master Password+ icon blinks, but no pop-up is shown.

Note that the websites in which I am already logged-in continue working normally. If I explicitly try to use a saved password, then I have to click the Master Password+ to enter my master password and continue.


"security. ask_for_password" Determines when Mozilla should ask for the master password.

0 (default): Only the first time it's needed.(As per your need set this value)

1: Every time it's needed

2: Every n minutes, where n is the value in security.password_lifetime.

My personal suggestion. Before leaving the system to some one. Press ctrl+shift+deleteand clear everything. So that it will prompt for master password again.

Or

Set browser.privatebrowsing.autostart value to TRUE

Find here the Source


If you have a master password, then Firefox will need you to input that password in order to use any of your stored passwords. There is no way around this, because the stored passwords are actually encrypted using a key derived from the master password.

So it is not possible to have a master password, but set Firefox only to ask for it if you want to "view" the stored passwords. It will still need to ask for it when you want to "use" them, too.

When you describe it happening at "random" times, it is probably happening when you first visit a website for which you have a stored password. If you are logging in to some websites without it asking for your master password, it will be because that website has made your login persistent (eg using cookies) negating the need to show a login form on that website. Or it will be because the browser has already asked you for your master password recently, so it has no need to ask again.

What you can do is ensure that it will only ask you for the master password once per browser session, which is controlled by the config setting security.ask_for_password as mentioned elsewhere (set it to 0).

Or, you can disable the master password. Your passwords will still not be shown visibly by default when you are using them, only when you go in and view them in the password manager. There is nothing wrong with finding the right balance between security and convenience for you - if you are annoyed by needing to put in your master password too much, and don't mind if Firefox can use your saved passwords without it, then a master password is not for you. Unfortunately it won't then be able to make the passwords invisible to users of your browser, though.