We help IT Professionals succeed at work.

adduser question

dbusher asked
Redhad 7.0
I want to use the adduser command to add user JDOE as part of the SALES group with PASSWORD BUCKO and leave the default path that of the sales group. And I want the new user login to be enabled.
adduser JDOE -g SALES -p BUCKO   seems to create the user ok but JDOE cannot log in with password BUCKO for some reason. Any clues
Watch Question

What's the exact adduser command line?

From the man page:
-p passwd
     The  encrypted password, as returned by crypt(3) or
     an MD5 password generator.  The default is to  dis-
     able the account.

IE., the password *MUST BE THE ENCRYPTED VALUE* not the plaintext password.

Indeed, if you look in your /etc/shadow file, you will see that for JDOE's encrypted password, it shows BUCKO.


     Why don' you use two commands such as :

"adduser JDOE -g SALES" and "passwd JDOE", with this second command you will have to enter the password "BUCKO" and you will have to confirm it.

Hope this help.



Thank you.  That works great.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.