Random Password generator – let’s generate the password from within the urandom mess….
For the beginning let’s issue the following command (cancel it by Ctrl+c !!):
$cat /dev/urandom
It shows us, where the script takes its random strings from, further used for the password generation
< /dev/urandom tr -cd '[:graph:]' | fold -w 8 | head -n 5
< /dev/urandom tr -cd '[:alpha:]' | fold -w 8 | head -n 5
< /dev/urandom tr -cd '[:alnum:]' | fold -w 8 | head -n x # x - number of returned lines for ex.: 100
Quick “tr” How To:
# alnum # alpha # blank # cntrl # digit # graph # lower # punct # space # upper # xdigit |
– Letters numbers – Letters – levels white mark? – control marks – digits – printed marks, excluding spaces – lower case – printed marks including spaces – punctuation mark – vertical or horizontal white mark (space) – upper case – HEX digits |