Note
Quote:
-p, --password PASSWORD
The encrypted password, as returned by crypt(3). The default is to disable the account.
|
Means you have to encrypt the passwd before you call useradd.
If you supply a plaintext passwordd, do this instead
echo password | passwd --stdin $USER
which will encrypt it for you and add it to /etc/shadow.