CentOS 6.5 - bash
I'm writing a script to add users with a default password to Samba. The password is a default for the new user specified in the script and should be entered by the script through stdin. I need syntax advice. The password should be typed into the script and not a variable since it's the default.
I've tried -
pdbedit -au username -t password password
pdbedit -au username -t "password" "password"
echo password | pdbedit -au username -t
I read the man page and looked for working examples but can't find any. I don't want to type a default password in every time I create a Samba user.
Help, please!