create & use unique & strong 16 alpha-numeric-special character passwords

Latest response

The scenario is:
I want to create unique & strong 16 alpha-numeric-special character passwords for all my internet based accounts.

The solution I am using is:
Create a function in the .bashrc file as below:
getPasswd() {
DATA=$1
openssl passwd -1 -salt MySalt "${DATA}" |cut -d$ -f4 |cut -c-16 | xclip -sel clip
}

I will call this function from terminal as below:
$ getPasswd abc@abc.com

And the 16 character password will be copied to the clipboard so I can paste it in the password field. This way unique and strong password will be used for each and every account. Every 3 months I keep changing the salt to get new password.

The problem in this solution is if anyone opens .bashrc file, they can see the salt I am using.

Possible solution I think is:
I have another folder which is encrypted using EncFS and I want to put this function in a file called "bashrc" in that folder and only when I mount that folder using EncFS password only then this function should be called. So typically, I have to remember only one password for EncFS folder.

Any suggestions to achieve this (keeping this function in a separate file in my encrypted folder) or to handle this scenario in a better way is welcome. Yes I can pass salt also as a parameter but the command becomes too big to type every time. Also if someone is right next to me looking at the screen, he will know the salt and username from which he can get the password as it is based on standard algorithm. Hence I do not prefer to type the salt every time.

Thanks in advance.

Responses