I created a new user:
$ sudo useradd -m Ari -p pass123
But when I went to login it said the password was incorrect, I know it's correct because I saved the command line log as a text file.
Other than that, at the same time I also created a group:
$ sudo groupadd testgroup1
and added the new account to it:
$ sudo usermod -a -G testgroup1 Ari
Why can't a log in?
Best Answer
The
-p
option is looking for an encrypted password:You should use the following to change the password:
In order to use the
-p
option you must first encrypt the password. You can use some of the methods mentioned here such as:Note the
mkpasswd
utility is included in thewhois
package which can be obtained through apt