Password protect google chrome

Is there any way to password protect google chrome browser? So that I can do "Remember password" on sites browsing in chrome in a shared computer and others can't access it


Solution 1:

Depending on your system you could encrypt your Chrome Profile Folder (TrueCrypt in Windows, equivalent ones on other operating systems)

Before starting chrome, you mount your encrypted archive, then use

chrome.exe --user-data-dir="<location to profile>"

to start the browser using that directory.

P.S.: You can put a specific link on your desktop with the parameter for the profile location, so others can use chrome with the default profile.

Solution 2:

One more useful tool very similar to Truecrypt - Rohos Mini Drive. I'm using it's feature - Hide folder to password protect my Google Chrome profile - http://www.rohos.com/2010/12/how-to-password-protect-google-chrome-data-with-rohos-encryption-software/

Solution 3:

Chrome's passwords are encrypted with your login password, at least on Windows, though very weakly. I'm going to have to say that it's a bad idea to use the browser's built-in password manager no matter what. Google Chrome can import Firefox's passwords even if Firefox's passwords are under a master password.

Use a dedicated password manager that is at least reasonably secure. The safest is probably KeePass because it's been around for quite a while. Lastpass is another option that is reasonably secure, but if you're working on the CIA, keep in mind that it hasn't been audited by any independent organization yet (KeePass hasn't been audited either, but it's open source, so thousands of people can and have read through the code for security flaws and those flaws are fixed very quickly).

In summary: if you're paranoid, use KeePass. If not, use LastPass.

Solution 4:

Unfortunately Chrome doesn't allow you to password protect user profiles anymore.

Basically, you load your Chrome Profile from an encrypted volume using Veracrypt residing in the computer or your external USB drive. When you're done, close Chrome and simply unmount the volume. You can do similar for Windows or Mac OS but specifics may differ. You may need admin privileges to mount/unmount.

Here is my setup in my Ubuntu 18.04:

First create a new User Profile in Chrome.

Open Terminal

cd ~/.config/google-chrome 
ls -al

You should see a new profile directory that is just created say, 'Profile 4'.

Sync to your Google profile and all Chrome extensions now if you like so you know roughly how much space to allocate on the encrypted volume. Example:

du -ch 'Profile 4'

Create encrypted Veracrypt volume file

Download GUI or Console version of Veracrypt for your OS distribution.

Create encrypted volume file somewhere not so obvious example:

touch ~/.config/profile.vc

Here is an example of using Veracrypt from the Terminal to create 256 MB (check your space requirement) Ext4 encrypted volume for your User Profile. You can use the GUI version if you want.

veracrypt -t -c --volume-type=normal ~/.config/profile.vc --size=256M --encryption=aes --hash=sha-512 --filesystem=ext4 --pim=0 -k "" --random-source=/dev/urandom

You will be prompted to assign your password. Also, enter administrator password if asked.

Mount Veracrypt volume you just created. Your mount directory now becomes something like /media/veracrypt1

After mount is successful, close Veracrypt GUI if you are in a shared computer.

Exit any running Chrome applications – important!

Move chrome profile directory to your encrypted volume.

mv 'Profile 4' /media/veracrypt1/.

Create a symbolic link.

ln -s "/media/veracrypt1/Profile 4" 'Profile 4'

Open Chrome and you can now switch to your user profile from encrypted volume.

When done, quit the whole Chrome application.

Then unmount your encrypted drive from Veracrypt and open Chrome again. You'll see your extra Chrome Profile avatar but can't switch into it.

Script for convenience

Create a bash script and make it executable.

touch ~/.config/profile 
chmod +x ~/.config/profile 
vim ~/.config/profile 

Add the following to the bash file:

#!/bin/bash 
VOL=~/.config/profile.vc
if [ $1 -eq 1 ] 
then 
    echo "Mounting..." 
    veracrypt -t -k "" --pim=0 --protect-hidden=no $VOL /media/veracrypt1
    sleep 2
    nohup google-chrome --profile-directory='Profile 4' &>/dev/null &

elif [ $1 -eq 0 ]
then 
    echo "Dismounting..."
    pkill --oldest chrome
    sleep 2
    veracrypt -t -d $VOL
else
    echo "Usage: ./profile 0 or ./profile 1"
fi

Usage

To mount encrypted volume and open Chrome using your user profile

. ~/.config/profile 1    # Prompts for your password :)

To close Chrome and unmount encrypted volume

. ~/.config/profile 0

Hope it helps!