I'm a bit of a noob with Perl, and can't to see what's wrong with this script:
#!/bin/sh
randAnPass=true;
if [ $randAnPass = true ]
then
pass=perl /root/bin/randpass
else
# prompt for setting user's password ..
echo -n "pick password for '${user}': "
read pass
fi
#echo $randAnPass;
echo "Generated pass = $pass";
For some reason it outputs:
r4Nd0mP
Generated pass =
I want it to output
Generated pass = r4Nd0mP