sudo vi /home/harith/.bashrc
add following script at the end
genpasswd() {Open your terminal and run this command to generate random password
local l=$1
[ "$l" == "" ] && l=20
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs }
genpasswd 16
Example:
harith@thinkmachine:~$ genpasswd 16
Br1WleFsmhJ4Dkwb
harith@thinkmachine:~$
0 comments:
Post a Comment