//View Tip #885
» Get your machines IP adress
» Find words in garbled text
» Find function declarations in PHP or JavaScript
» List non-system users
Steve Drees
Similar Tips
» Get your IP in one line » Get your machines IP adress
» Find words in garbled text
» Find function declarations in PHP or JavaScript
» List non-system users
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Generate a random 8 character password containing a-z, A-Z and 0-9:
egrep -ioam1 '[a-z0-9]{8}' /dev/urandomComments
Add your comment
#1
On linux I greatly prefer to use pwgen.
Posted 2009-09-16 08:51:00
egrep -oam1 '[A-Za-z0-9]{8}' /dev/random
works much better for me. Dropping the -i option and including A-Z in the regexp speeds it up alot.
works much better for me. Dropping the -i option and including A-Z in the regexp speeds it up alot.
Posted 2009-09-16 10:33:36
There's a perl program that already does this called makepasswd. To use:
makepasswd --chars=20
or you can even add it directly to a user:
usermod -p `makepasswd --chars=20` user
makepasswd --chars=20
or you can even add it directly to a user:
usermod -p `makepasswd --chars=20` user
Posted 2009-09-21 05:57:58
None of these work verbatim on Solaris 10. In Solaris Land, "egrep" has no "o", "a", or "m" options and "head" has no "c" option. Also, stock "egrep" doesn't support "{}".
Slight correction: the "openssl" trick does work.
Slight correction: the "openssl" trick does work.
Posted 2009-11-12 10:50:34
Use 'mkpasswd' Linux command with the required options.
'mkpasswd -l 8' should suffice here.
You can make it still complex using something like : mkpasswd -l 15 -d 3 -C 5 -s 3 -2
'mkpasswd -l 8' should suffice here.
You can make it still complex using something like : mkpasswd -l 15 -d 3 -C 5 -s 3 -2
Posted 2010-02-10 15:32:06
i believe you are a good writer, but have you erver thought to write some special artcals for peopel who likes shopping very much.
Posted 2010-07-15 22:47:15
i believe you are a good writer, but have you erver thought to write some special artcals for peopel who likes shopping very much.
Posted 2010-07-15 22:47:52
works much better for me. Dropping the -i option and including A-Z in the regexp speeds it up al
Posted 2010-07-30 22:37:39

