19

I recently migrated from Windows7 to Kubuntu 10.0.4. In many ways, I'm loving the change. (I never knew it could be such a seemless process to write/test scripts!)

One of the few things that is causing me any hangup is that none of the passwords that were saved in my browser are available (obviously, since it's a completely separate installation). Is it possible to export my passwords from the Windows instance of Chrome and then import them into the Linux version?

  • An answer is available here superuser.com/a/675167/65975 – ccpizza Oct 11 '15 at 8:58
  • The functionality appears to be built into chrome://settings/passwords now. See the duplicate question to which ccpizza links above. – Mathieu K. Mar 11 '19 at 6:55
8

As Neal said, the folder User Data is the one to look for. If you want a software solution try the extension Lastpass (or at the Google site). It allows you to save and restore password in Google Chrome as well as in Firefox, IE and Safari.

| improve this answer | |
  • I've been using LastPass for 2 years and it works great! Got it on 6 browsers on 4 different OS's – TheLQ Jul 17 '10 at 17:10
  • 2
    It seems that lastpass is not longer able to export the passwords to chrome -.- Is there already a new solution? – LuckyMalaka Mar 2 '12 at 7:38
  • @mmm... This is almost a month after you asked, but I wanted to answer you: I don't think you need to export the passwords with Lastpass. Just install the extension onto whichever browser you use and they will be available. From any system. The passwords are stored in their encrypted vault, so you don't have to worry about any of that on your end. – Jeffrey Blake Mar 30 '12 at 17:33
  • I don't think that the User Data part is still relevant as Chrome now stores its saved credentials in the system's keyring. Also, it should be mentioned that LastPass is a commercial service whose feature is to sync passwords "in the cloud" and which will ask you to register an account and send the passwords to them. It's not a simple "export" extension. – Hey May 23 '17 at 18:06
10

You can also use this standalone tool called chromepass http://www.nirsoft.net/utils/chromepass.html

ChromePass is a small password recovery tool that allows you to view the user names and passwords stored by Google Chrome Web browser.

There is a option to export into your keepass password manager too.

Note: If you feel unsafe to use third-party tools, get script from here https://github.com/hassaanaliw/chromepass and run yourself.

| improve this answer | |
  • Perfect! I'm in the process of migrating to KeePass and this is just what I need. Thanks! – Tim Lewis Aug 20 '13 at 17:28
  • Thank You! Good solution. Just don't forget to turn off the security scanner before, because detects as a harmful software what want to stole your information. – eapo Jul 4 '16 at 22:10
  • @eapo Disabling the security software detecting a program as malicious is an incredibly stupid thing to do unless the code has been at least well-reviewed, which it hasn't be because the code is not public. This program is detected as malicious by at least 17 antiviruses (virustotal.com/fr/file/…). Bonus point for being distributed over HTTP and therefore being vulnerable to tampering. – Hey May 23 '17 at 17:55
  • @YdobEmos It's labeled as malicious because it retrieves stored passwords and may therefore be used in a malicious way. NirSoft is a trustworthy company. – DavidPostill May 23 '17 at 19:40
  • 1
    @Arul Thank you, but I solved my password extraction problem with Adam's answer, which requires nothing more than Chrome. I was raising concerns that this answer could put other users at risk while not being necessary at all. I hope my comments will at least make them think twice before running an untrusted binary downloaded over an insecure connection. – Hey May 24 '17 at 18:28
10

Enable password export in Chrome by going to chrome://flags/#password-import-export, then you can export it to CSV file.

Source: How to Export and Import passwords in Chrome browser.

| improve this answer | |
  • This should be the accepted answer. It's simple, doesn't require additional software and is totally safe as it doesn't require the user to trust some unknown shady freeware. – Hey May 23 '17 at 18:02
  • 5
    As an update, for Chrome 59 this still works but you will need to go to chrome://settings-frame/passwords to access import/export ability after the flag – Legion Jun 15 '17 at 17:55
  • For Chrome 63, it's back to being available from the normal "Settings" → "Advanced" → "Manage Passwords" – Micah Lindström Jan 19 '18 at 15:39
  • For Chrome 66, it no longer works – user128580 May 11 '18 at 6:29
5

I found a decision how to show all your passwords from Chromium. Tested on Ubuntu 14.04 and Chromium: Version 40.0.2214.111 Ubuntu 14.04 (64-bit). I used js script found early in search.

Output maked in format: url|login|pass

Steps:

  1. Open in Chromium browser link to Chrome password manager: chrome://settings-frame/passwords

  2. Open console (F12) and insert this js code:


    out="";
    out2="";
    var pm = PasswordManager.getInstance();
    var model = pm.savedPasswordsList_.dataModel;
    var pl = pm.savedPasswordsList_;

    for(i=0;i<model.length;i++){
       PasswordManager.requestShowPassword(i);
    };
  1. After step 2 you will see all your passwords in Chromium Password manager Dialog.

  2. And now insert this part of js code in console:


    for(i=0;i<model.length;i++){
    var item = pl.getListItemByIndex(i);
    out+="\n"+model.array_[i][0]+"|"+model.array_[i][1]+"|"+item.childNodes[0].childNodes[2].childNodes[0].value;
    out2+='<br/>"http://'+model.array_[i][0]+'","'+model.array_[i][1]+'","'+item.childNodes[0].childNodes[2].childNodes[0].value+'","http://'+model.array_[i][0]+'","","",""';
    };
    console.log(out);
    document.write(out2);
  1. Now you see all your passwords in format i described early.

  2. Write script on any language to import your passwords in browser like FireFox :)

  3. Profit.

Github: https://github.com/megmage/chrome-export-passwords

p.s. I Try to use all parts of code together, but it isnt work :(

update: Chrome API based version in GitHub.

| improve this answer | |
4

You could try XMarks.

I'm fairly sure that if you just copied the profile (ie the stuff in C:\Users\Username\AppData\Local\Google\Chrome\User Data\Default)from Windows to Linux, you would get everything working correctly, without any export/ import.

| improve this answer | |
  • The exact file where the passwords are stored is Login Data. – chris-l Aug 26 '13 at 17:01
  • 1
    Latest versions of chrome don't store the actual passwords in that file anymore. On windows it uses the system credential storage and on Linux the system keyring is used. – ccpizza Nov 12 '13 at 23:09
  • xmarks does not synchronize passwords anymore, gotta use lastpass – arod Nov 29 '13 at 23:38
0

Export

  1. Go to chrome://flags/#password-import-export page (paste into address bar).
  2. Enable Password import and export and restart web browser.
  3. Go to chrome://settings/passwords, you should see the Export button.

    Alternatively run this script in DevTools Console (JS):

    chrome.passwordsPrivate.exportPasswords();
    
  4. Export into CSV and verify the content of it.

    Note: If CSV file is empty, check this Issue 808233.

| improve this answer | |
-1

Fix on solution posted by Skidisaster

out="";
out2="";
var pm = PasswordManager.getInstance();
var model = pm.savedPasswordsList_.dataModel;
var pl = pm.savedPasswordsList_;

for(i=0;i<model.length;i++){
   PasswordManager.requestShowPassword(i);
};


for(i=0;i<model.length;i++){
var item = pl.getListItemByIndex(i);
out+="\n"+model.array_[i].shownOrigin+"|"+model.array_[i].username+"|"+item.childNodes[0].childNodes[2].childNodes[0].value;
out2+='<br/>"http://'+model.array_[i].shownOrigin+'","'+model.array_[i].username+'","'+item.childNodes[0].childNodes[2].childNodes[0].value+'","http://'+model.array_[i][0]+'","","",""';
};
console.log(out);
console.log(out2);
document.write(out2);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.