Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.


Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.


Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.


Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells

Simple Shell Random Password Generator

Submitted by on October 2, 2012 – 10:54 am One Comment

A very simple script to generate a random secure password of desired length. This can come in handy when setting up multiple user account and/or lacking imagination.

# Random password generator
if [ $# -gt 0 ];then m=$1;else m=8;fi
d=$(expr $RANDOM % 5);l=$(expr ${m} + ${d})
cat /dev/urandom | tr -dc "a-zA-Z0-9@#*=" | dd  bs=${l} count=1 2>/dev/null;echo


Print Friendly, PDF & Email

One Comment »

Leave a Reply

%d bloggers like this: