1

This question already has an answer here:

I have an install script that creates a user:

sudo useradd -c "My test user" -G users -m -p "passw0rd$" -K PASS_MAX_DAYS=-1 -s /bin/bash myuser

However when I try to log in via ssh I get the following error:

myuser@myserver's password:
Permission denied, please try again.

But when I login as root and update the password to the same one specified in the original command:

passwd passw0rd$

I am then able to log in without any problem. What could be causing this problem?

marked as duplicate by steeldriver, Jeff Schaller, slm Jun 29 '16 at 11:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Are you encrypting the password, as described in the useradd man page? – steeldriver Jun 29 '16 at 10:55
  • I am just typing the commands above, so I don't think so – algorhythm Jun 29 '16 at 10:56
  • try using a password that doesn't contain a dollar sign, see if that works – gogoud Jun 29 '16 at 11:37
  • No that didn't work – algorhythm Jun 29 '16 at 13:41

Browse other questions tagged or ask your own question.