Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Import passwords to Chrome browser with csv file

If your Chome web browser is locked down and unable to offer to save passwords, you can probably still load in passwords. You can use csv import and export features to examine how Chrome exports them, and then write your csv entry manually and import it. You might need to enable password import: Visit chrome://flags#PasswordImport and enable that flag. Export any current passwords you have to a csv, so you can examine the columns. For me, the columns were:

name,url,username,password
site.internal.example.com,https://site.internal.example.com/full/url/to/login/page,daUserName,Th3p@s5w*rd

The passwords are saved in file "Login Data" which in Windows is stored as %localappdata%\Google\Chrome\User Data\Default\Login Data. If Chrome is wiping your passwords when you close the browser, then you can mark the "Login Data" file as read-only before running Chrome. But to import a new password from csv, you need to run the program with the file as writeable, and then back up the file after importing the password. Then, close the browser and it will wipe the passwords in the main file. Then restore your backup, and mark it as read-only, and then you can run Chrome and close it at will, with the new passwords.

Comments