Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all, I have a really weird problem here. When i try to add a user like this Code: useradd test2 -g labels -m -d /home/labels/test2 -s /bin/sh -p $1$FaOtejz7$4BbqatyzZ6AZ0WQHV1xlv. ...
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Posts
    5

    Sarge: useradd -p encrypted passwords not adding right password

    Hi all,

    I have a really weird problem here.

    When i try to add a user like this

    Code:
    useradd test2 -g labels -m -d /home/labels/test2 -s /bin/sh -p $1$FaOtejz7$4BbqatyzZ6AZ0WQHV1xlv.
    The user is added normally but the password does NOT work
    (so i cannot login with that user - using "testuserpass" in this case)...

    when i go to Webmin the user's pre-encrypted password is different..
    and when i add "$FaOtejz7$4BbqatyzZ6AZ0WQHV1xlv." (the same as above) for the same user in the webmin form.. the password is added correctly!

    I had made the same in Woody and all worked fine..
    could it be that useradd in sarge is bugy??

    i do not think so.. so please give me some help

    Thanks,
    Alex

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    My guess is you need to drop the $1 from the beginning.

  3. #3
    Just Joined!
    Join Date
    Jan 2007
    Posts
    5


    you have a good eye.. but that was just a copying mistake on this forum post
    the string i added to webmin is actually "$1$FaOtejz7$4BbqatyzZ6AZ0WQHV1xlv." so with the "$1".. i also double checked just to be sure.. the problem is still there..

  4. #4
    Just Joined!
    Join Date
    Jan 2007
    Posts
    5

  5. #5
    Just Joined!
    Join Date
    Jun 2011
    Posts
    2

    hi

    -m and -d options are not be used at a time

Posting Permissions

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