55
22
I logged into Mozilla's Bugzilla. I noticed Firefox did not save my password.
How do I manually add my username and password to Firefox's Saved Password list?
55
22
I logged into Mozilla's Bugzilla. I noticed Firefox did not save my password.
How do I manually add my username and password to Firefox's Saved Password list?
90
If you're a developer with 3 minutes to spare, this is how to do it without installing another add-on.
On the login page, Inspect Element the username and password fields and take note of their name
(or id
, if no name
is given) attributes. For example on Khan Academy, that would be identifier
for the username and password
for the password.
Inspect Element somewhere on the page. Find a small div or so, that's easiest.
Right click the element in your inspector and choose Edit As HTML
.
Add the following HTML:
<form method=post>
<input name=identifier>
<input type=password name=password>
<input type=submit>
</form>
Replace the names (identifier
and password
) with the names from step #1. Note that you should not replace type=password
, only the name=password
field!
Enter your credentials on the page in this form and hit submit. Firefox will now prompt you to save the credentials. The website will probably burp up an error or ignore the request or something, but we don't care about that.
Why does this work? Some sites deliberately do something funny to prevent you saving the password (the browser's remember password feature is often seen as insecure); other sites just have a funny form mangled beyond recognition for Firefox. Adding this simple form makes Firefox detect it and when you enter your credentials, it will prompt you to save them.
Now on the login page, as long as the fields actually have name
attributes at all I guess (and it probably needs to be wrapped in a <form>
too, I don't know), Firefox will typically recognize the fields and be able to fill them for you.
Alternatively, it might simply be that the website has autocomplete=off
set on the field. You can remove this as follows:
form
element is highlighted, look for the attribute that says autocomplete='off'
(You may have to scroll up and look for the form
element in the Inspector
tab)off
to on
3
To simplify the advice by the top poster, the reason the feature doesn't work on some websites, whilst working on others, is due to the non-standard and/or malicious code used by enterprise websites like Hertz.com.
In the case of Hertz.com, I was able to make Firefox save the password by doing the Inspect Element on the Login button, and then doing the Edit As HTML trick, and changing the type
of button
from button
to submit
; without this trick, even the Remember Password bookmarklet wouldn't work:
-<button type="button" class="primary gblFloatLeft" id="loginBtn">
+<button type="submit" class="primary gblFloatLeft" id="loginBtn">
Login
</button>
In short, doing Inspect Element and then Edit As HTML to fix all the malicious and non-compliant HTML works wonders!
This worked for me when the top-rated answer by Luc did not. The site was godaddy.com. I had to re-type the username in the FF dialog asking me if I wanted to save the password. – BISI – 2019-06-25T22:07:36.680
2
I know this question is old, but I figured I'd throw in my solution anyway.
Since Firefox sometimes fights me on certain websites, the solution I've developed is using another browser such as Chrome and saving the username/password there. Then you can import the login information for the specific website from that other browser.
After you've saved the password in the other browser, you can do the import by following these steps:
*These steps are valid for Firefox version: 62.0.2. I imagine it's similar for other versions, but can't say for sure.
1There is no "Import" button in the saved passwords dialog of Firefox version: 60.6.3esr – Pro Backup – 2019-05-15T15:31:58.560
2
Since Firefox 70.0 this is now a built-in feature in the password manager (Firefox Lockwise). To access it navigate to the saved password list or type about:logins
in the address bar; At the bottom left corner click the Create New Login.
PS: Solution to my specific problem - App Store Connect not saving my credentials - I put https://appleid.apple.com
as the website address when adding a new login.
1
You are all creating a lot more work for yourselves than seems necessary.
Create a CSV file.
You can do this with an ordinary text editor: or go into Firefox Options, Security, Passwords, and export your current passwords into a CSV file instead of the default XML file.
Edit this file with a text editor (or spreadsheet).
The beginning of the file should look like this:
# Generated by Password Exporter; Export format 1.1; Encrypted: false
"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField"
Edit one of the existing entries to change the data to match the entry you want to add, such as:
"http://192.168.0.1","admin","modempassword","","","login","password"
The last two entries will probably have to match the field names already on the web page as previously described. I semi-guessed "login" and "password" when I tried this.
Go back into Firefox Options Security and import the CSV file.
You now have a new entry in your password manager. No fiddling around with Add-ons (many of which won't work with the current ESL releases) or adding and possibly messing up HTML. If you make a mistake in the CSV file the worst that can happen is that Firefox won't import it and you'll have to edit it and fix the mistake.
1
when I need to add password to Firefox I use FEBE Add-on to extract my passords to Json file edit it an re import the file again. i hop that help.
6doesn't work anymore since the FF Version changed to "Quantum" – Albin – 2018-09-17T11:39:02.593
0
The top answer works but there's no need to create a fake form in most cases. Just inspect the login button and change it's type from "button" to to "submit". Enter your password and hit the button, it will prompt you to save but probably not log you in as it's expecting a vanilla button. Refresh the page to undo your changes, enter your email and voila, it should autofill your password.
0
I'm author of Save my Password addon for Firefox that solves this problem.
It creates dummy input fields on the page where you enter (or update) your credentials and when you click the "Save my Password!" button, Firefox will ask you to save (or update) your password for the page.
https://addons.mozilla.org/en-US/firefox/addon/save-my-password/
-1
More simple solution worked for me. No need to add new form. I just added <input type=submit>
to original login form and another button appeared. First I pressed new button and FF save password dialog appeared. Second I pressed original button and logged in.
This should be added as a comment to answer https://superuser.com/a/1084364/395378 but not as a new answer.
– dirdi – 2019-09-14T22:56:41.670I tried, but can't. "You must have 50 reputation to comment" I'm new here. – Alexey – 2019-09-16T05:33:38.963
Commenting on other people's posts is a privilege gained from earning reputation - if you haven't earned it yet, try to get comfortable writing answers first. https://superuser.com/help/privileges/comment
– dirdi – 2019-09-16T06:33:14.820Sory, I faced this FF problem and found solution here. Later I found more simple solution and wanted to share, but unfortunatelly couldn't do it in proper way. It's first and probably last thing I wanted to share here. No sense to earn any reputation. I have nothing else to tell. – Alexey – 2019-09-16T20:21:09.260
-2
The best idea is not to depend on the browser's caching of the passwords, since the mechanism will surely change over time, and there will always be a problem when moving from one computer to another or when using more than one computer.
It is much safer and easier to use a specialized product that will keep your passwords safe and available on all computers and for all browsers and programs.
The best one I have found is LastPass, where the passwords and the contents of all the fields in their containing forms are encrypted and saved on their servers. The encryption is done on your side and using your master password for protection, so the LastPass website has no idea of what is stored on their own servers.
LastPass integrates with the browser to remember passwords and all the other fields that you have entered into the form, as sometimes more than just the password is required (for example the email or user-name). You may also manually enter this data for websites or programs into the LastPass repository.
The power of this concept was proven when the LastPass website was hacked. The results were rather minor for the users, as the most that the hackers managed to get were the password hints, as the encrypted passwords themselves were useless to them without the master password.
Another product is the open-source KeePass, which is also very popular among users.
8Adding a fake form.. Brilliant idea :))) Worked.. Thanks. – Emadpres – 2018-01-05T09:26:33.927
Most likely your 'identifier' will be 'username'. Form can be inserted mostly in any place of DOM. Nice idea! Thanks! – Maxim – 2018-04-12T03:45:09.470
5Note that if the elements don't have a
name
attribute but only anid
, you can just copy those - works like a charm! – Erwin Wessels – 2018-05-16T19:03:23.663@ErwinWessels Thanks for the note! If you think it would be good to add that to the post, feel free to edit! – Luc – 2018-05-16T20:36:36.250
2Thanks! No plugin currently works in Quantum, but of course, this still works. – jpaugh – 2018-07-04T23:20:32.610
@jpaugh "No plugin currently works in Quantum" yeah that's why I'm still on Firefox 55: in 56+, stuff started breaking and they still haven't implemented the APIs necessary to replace them. Not only didn't they give devs time to replace, they aren't even making it possible a year later. – Luc – 2018-07-05T09:55:26.700
I obviously love you now. I have zero HTML dev skills. And I was able to get it to work. – Santa – 2018-09-10T17:08:14.833
1@Santa Good to hear that it's even doable for non-developers! :D – Luc – 2018-09-11T16:10:36.773
1This didn't work for me initially. The reason? I'd previously told FF not to save the password for the site :/ So, if you're forgetful like me and this method doesn't work then check if you've told FF not to remember the password for the site. – Paul – 2018-09-29T02:46:52.447
6You can also find the
form
to which the login inputs belong and submit it. E.g. you can click on an input field with the inspector, and do$0.form.submit()
($0
being the last thing you inspected). This should get FF to prompt you to save the password. – mitjak – 2019-01-12T20:34:06.607Soooo great! Thank you. – raiserle – 2019-08-12T14:05:40.650
Alternatively, you can also double click on the Form attribute that says "autocomplete=off" and change it to on. – Ashwin Jayaprakash – 2019-09-29T18:39:43.703
@AshwinJayaprakash If there is such an attribute, then yes, that would be the easy solution! Do you want to edit that tip in for the edit bonus, or shall I? – Luc – 2019-09-29T21:08:49.107
@Luc I've edited the answer. It's awaiting approval. Thanks – Ashwin Jayaprakash – 2019-10-02T02:42:22.293
@AshwinJayaprakash Your account doesn't have any edits that I can see, but yesterday there was an anonymous edit which I approved (and then slightly edited after approval). So it's no longer waiting approval :)
– Luc – 2019-10-02T07:10:11.813Thanks, that was me :) I forgot to sign in – Ashwin Jayaprakash – 2019-10-03T13:23:36.840