Always your password with you

ffpass Script to quickly retrieve a password from the Firefox cache.

Firefox on my desktop PC at home remembers the most passwords for me. Sometimes I need a password from a site when I'm at work or on the road with my phone. I then log in at home (via SSH) and request the password with this script.

The script works with the nss-passwords tool. Install that with sudo apt install nss-passwords. You have to look up the profile path of Firefox once (at home or via SSH) and enter it in the script. You can find that folder by typing about:support in the Firefox address bar and then the value at Profile folder to take over.

Example output when I type ffpass shop it shows all passwords from sites with the phrase "shop":

The script:

if [ -n "$1" ]; then
cd "/home/user/.mozilla/firefox/lt230o4a.default-release"
nss passwords -d . $1
echo "Use: ffpass "
echo " is some letters of the domain you want to see the password for"
echo "Example: ffpass gmail"

How to use

Place the script in a file ffpass and make it executable with:
chmod +x ffpass
Run the script from inside a terminal window:


Put this script in crontab so that it runs automatically periodically:
crontab -e
View 30 more scripts