I was looking for a random password generator tool to use it while creating oracle users. And found a cool solution that works on a linux OS.
It works using linux urandom function:
Here, i'm using head -c 8 to show me 8 character long password.
If you feel that the command is tough to memorize. Then just create a function and call it!!!
Now simply call it with your intented string length..
Isn't it cool!!! :)
It works using linux urandom function:
tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs
genpasswd() {
local l=$1
[ "$l" == "" ] && l=16
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
}
genpasswd 8
EMI_EeCa
No comments:
Post a Comment