linux - KSH password generator -
how make sure generated passwords contains these special characters (?!/=) ?
currently i'm using:
pwd_usr["$i"]=`cat /dev/urandom|tr -dc "a-za-z0-9-_\?\!\=\/\"|fold -w 15|head -n 1`
but of generated passwords might not contain special characters want. please help. thanks.
i suggest manually can check out yourself, so:
i=0 while -lt 100 i=$(expr + 1) var=$(pwd_usr["$i"]=`cat /dev/urandom|tr -dc "a-za-z0-9-_\?\!\=\/\"|fold -w 15|head -n 1`) done echo $var
so this, create 100 passwords, store them in var
, output of echo can check if passwords contain want, , happy or keep on working :)
p.s
to make easier yourself, after output gets printed copy of editor , use search
, control+f
, know, , add characters want in order save lots of time.
Comments
Post a Comment