Results 1 to 3 of 3
How can i add a user...??
i used the command "useradd -m <username> -p <password>
but i cannot login to this account..it says " Authentication Failure"
please HELP!!!! I WANT ...
- 03-09-2011 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 11
Useradd
How can i add a user...??
i used the command "useradd -m <username> -p <password>
but i cannot login to this account..it says " Authentication Failure"
please HELP!!!! I WANT A SINGLE COMMAND TO ADD A USER WITH PASSWORD...
- 03-09-2011 #2
From the man page for useradd:
useradd is a low level utility for adding users. On Debian,
administrators should usually use adduser instead.You didn't say what distro you're using, and that makes a difference. Do you absolutely have to add the user in a single command? It's not difficult to do it with a script which accepts input.-p, --password PASSWORD
The encrypted password, as returned by crypt(3). The default is to
disable the password.
Note: This option is not recommended because the password (or
encrypted password) will be visible by users listing the
processes.
You should make sure the password respects the system's password
policy.
- 03-09-2011 #3Just Joined!
- Join Date
- Mar 2011
- Posts
- 2
For fedora/red hat/cent you can use:
useradd -p password username
As mentioned above though it is not good practice to have a users password in the history.
I would probably just useradd then do a passwd.


Reply With Quote