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