I have run the command
sudo useradd testuser
Then when I run
it ask for a password, and I have not set a password. So no matter what I type it gives me an authentication failure...
What am I missing here?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
useradd does not ask/set the password. You need to set the password with the
passwd command (so that the hashed password gets written in
sudo passwd testuser
useradd is a low level utility, you need to specify options specifically, you might also need to create home directory for the user and set a login shell e.g.:
sudo useradd -d /home/testuser -m -s /bin/bash testuser
If you are on Debian (or any of it's derivatives), look at the