Breaking News
Loading...
Monday, August 5, 2013

Shell Scripting:Linux Random Password Generator With Bash Script

8:57 AM
#!/bin/bash
# Under RedHat / Centos
if [ $# -gt 0 ]
then
 MIN=$1
else
 MIN=8
fi

DEL=`expr $RANDOM % 5`
LEN=`expr $MIN + $DEL`
cat /dev/urandom | tr -dc "a-zA-Z0-9@#*=[]" | dd  bs=$LEN count=1 2>/dev/null
echo;

0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Toggle Footer