Hi there... say I have the following bash script:
Code:
read -p "Enter a username and press [enter]: " UNAME
echo
read -s -p "Enter a password and press [enter]: " PWORD
echo
useradd -s /sbin/nologin $UNAME
passwd $UNAME
What I want to do is pass the $PWORD the the passwd command when it asks for a password.
Is this possible?