I am using Debian. I am learning Bash scripting. I am creating a script that creates new user and sets password the problem is I get passwd: unrecognized option '--stdin'
error
That is my script:
#!/bin/bash
read -p "Please Enter Your Real Name: " REAL_NAME
read -p "Please Enter Your User Name: " USER_NAME
useradd -c "${COMMENT}" -m ${USER_NAME}
read -p "Please Enter Your Password: " PASSWORD
echo ${PASSWORD} | passwd --stdin ${USER_NAME}
passwd -e ${USER_NAME}