3 # Generate a random password, written to standard output
7 if test "x$1" = "x" ; then
8 PWL=48 # Password length in characters
12 tmp=`mktemp randpass.XXXXXXXXXX`
13 if test x$tmp = x; then
16 echo "Temp file security problem on: $tmp"
20 cp autoconf/randpass.bc $tmp
21 ps | sum | tr -d ':[:alpha:] ' | sed 's/^/k=/' >>$tmp
22 date | tr -d ':[:alpha:] ' | sed 's/^/k=k*/' >>$tmp
23 ls -l /tmp | sum | tr -d ':[:alpha:] ' | sed 's/^/k=k*/' >>$tmp
24 echo "j=s(k); for (i = 0; i < $PWL; i++) r()" >>$tmp
26 bc $tmp | awk -f autoconf/randpass.awk