Save Chrome Passwords
Jump to navigation
Jump to search
Goal: save passwords stored in chrome/chromium in an encrypted text file.
- Create temporary file readable only by yourself
touch /tmp/pw.tmp chmod 600 /tmp/pw.tmp
- Open URL chrome://settings/passwords
- Make all needed passwords visible
- Mark/copy from first host to last password
- Paste text into temporary file /tmp/pw.tmp
- For each entry that has no username, add one manually
- Reformat text and encrypt
awk ' NR % 6 == 5 {gsub(/ /, "", $1); h=$1} NR % 6 == 0 {gsub(/ /, "", $1); u=$1} NR % 6 == 2 {gsub(/ /, "", $1); printf "%-35s %-35s %-10s\n", h, u, $1} ' pw.tmp | gpg -c >pw.txt.gpg
- Check encrypted content
gpg -d pw.txt.gpg
- If content is ok delete temporary file
rm /tmp/pw.tmp