LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Add New User with Password (https://www.linuxquestions.org/questions/linux-newbie-8/add-new-user-with-password-486718/)

canuck_barlow 09-25-2006 02:30 AM

Add New User with Password
 
Hey,

This may be a dumb question but when I create a new user with:

adduser -p xxx foo

when I try to login the account it doesn't work. In order for it to work I have to do:

passwd foo

and put the password in that way. Then I can login no problem.

So my question is, what does the -p switch do?

bulliver 09-25-2006 02:41 AM

Code:

  -p, --password PASSWORD      use encrypted password for the new user
                                account

So, I take it that it wants you to pass the hashed password, not the plaintext version. See man 5 passwd, man 5 shadow, and man 3 crypt.


All times are GMT -5. The time now is 03:39 AM.