Results 1 to 6 of 6

Thread: Debian: useradd –p encrypted password is not working on Sarge

  1. #1
    Join Date
    Apr 2011
    Posts
    60

    Debian: useradd –p encrypted password is not working on Sarge

    Well I am having really frustrating issue with the Sarge which I have installed on the computer of mine. I am trying to add the user by using the following command.
    Code:
    useradd test2 -g labels -m -d /home/labels/test2 -s /bin/sh -p $1$FaOtejz7$4BbqatyzZ6AZ0WQHV1xlv
    I am able to add the user by using the above mentioned command however the password is not working at all. Let me know if you are having any specific solution to fix the matter of mine. Thanks a lot in advance.

  2. #2
    Join Date
    May 2008
    Posts
    859

    re: Debian: useradd –p encrypted password is not working on Sarge

    I am suggesting following solution and it would only work if you are going to create a new account on the computer. Well I you should run the following command on the terminal.
    Code:
    passwd <username>
    after using the above mentioned command you will be able to set the password on the computer of yours.

  3. #3
    Join Date
    May 2008
    Posts
    962

    re: Debian: useradd –p encrypted password is not working on Sarge

    I think I have figure out the root cause of the problem which you are getting and you can use the following instruction to resolve the matter. Well you cannot use –m and –d option together on the computer. You should use –m or –d option on the command and see whether it is working or not. So you should try to fix the matter of yours and let me know whether it is working or not.

  4. #4
    Join Date
    May 2008
    Posts
    991

    re: Debian: useradd –p encrypted password is not working on Sarge

    Well looking at the situation which you have mentioned over here I am suggesting following thing which you can use to fix the matter of yours. you should run the following command on the terminal.
    Code:
    addgroups labels
    once you have add the group label into the mkdir /home/labels. Now you should run the command which you have mentioned on the question I am hoping that it would be useful to you.

  5. #5
    Join Date
    May 2008
    Posts
    1,020

    re: Debian: useradd –p encrypted password is not working on Sarge

    I am suggesting following script which you should run on the terminal and see whether it is working or not.
    Code:
    $crypthash = crypt($_POST['label_pass']);
    $outputFilesystem =
    shell_exec('sudo useradd '.$labelusername.' -g labels -m -d /home/labels/'.$safeLabelName.' -s /bin/sh -p '.$crypthash);
    I have already used the above mentioned script and it really worked for me.

  6. #6
    Join Date
    Nov 2009
    Posts
    824

    re: Debian: useradd –p encrypted password is not working on Sarge

    I am suspecting that the encrypted password which you have used is quite big. I am suggesting following script which you can run.
    Code:
    #!/usr/bin/python2.4
    # -*- coding: latin1 -*-
    #
    
    import crypt
    
    import random
    import string
    
    def getsalt(chars = string.letters + string.digits):
       return random.choice(chars) + random.choice(chars)
    
    print crypt.crypt("testuserpass" , getsalt())
    I think you need to install the following module on the computer.
    apt-get install python-crypto
    so try the same and let me know whether it is working or not.

Similar Threads

  1. Replies: 4
    Last Post: 04-03-2012, 05:55 PM
  2. Recover Bitlocker encrypted drive password
    By svkrocks in forum Networking & Security
    Replies: 2
    Last Post: 31-08-2011, 09:46 PM
  3. How to print PDF file that’s been password encrypted???
    By Gandhali in forum Windows Software
    Replies: 6
    Last Post: 23-10-2010, 06:12 PM
  4. How to decrypt an encrypted password?
    By PersonOfTheFall in forum Software Development
    Replies: 5
    Last Post: 22-09-2009, 09:23 AM
  5. How to Decrypt Encrypted Password?
    By RoadRunner in forum Software Development
    Replies: 2
    Last Post: 04-03-2009, 02:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,561,166.73110 seconds with 16 queries