Find the answer to your Linux question:
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 ...
  1. #1
    Just 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...

  2. #2
    Linux User sgosnell's Avatar
    Join Date
    Oct 2010
    Location
    Baja Oklahoma
    Posts
    358
    From the man page for useradd:
    useradd is a low level utility for adding users. On Debian,
    administrators should usually use adduser instead.
    -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.
    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.

  3. #3
    Just 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...