I've got an issue with the useradd command. Well, I think it isn't really an issue but I need more details on it.
I create two users by two differents ways:
1/ useradd guest -p guest01
Following the man the password should be encrypted.
2/ useradd dave
Then, when I did a more /etc/shadow, I've got the two following lines :
One seems to be encrypted and the other one not, but following the man and the arguement -p in the command useradd the one that should be encrypted should be guest and not dave, isn't it ?
The man of the argument -p said :
-p, --password PASSWORD
The encrypted password, as returned by crypt(3). The default is to disable the account.
Then, the problem is that I can't log in with the login guest like it was deactivated !!
Can you please help me to describe me what I did wrong and what is the right command to encrypt a pwd and leave it active ?
Many thanks in advance.