Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Created new user from shell script using following command:

sudo useradd $1 -p $2 --home /var/www/$1

I'm not able to login to FTP or SSH as that user, do i need to add the user to some group for that?

share|improve this question
up vote 3 down vote accepted

Have you entered the password in encrypted form as returned by crypt like it is mentioned in the man page of useradd?

share|improve this answer

Also note the first sentence of the Description section of useradd(8):

useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.

It's likely that adduser(8) would have done whatever it is that needs doing.

share|improve this answer
No, adduser has no argument to set the password at all. – Gilles Sep 4 '12 at 22:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.