1

I have a dual boot Kali Linux along with windows 7. Now when I installed Kali it logs me in as root. I do not have a login in my name. So I created a user with the following steps. However when I log off and login, there is an " Authentication Failure" with the new login. Where am I going wrong?

 laa@aa-lu:~$ sudo useradd testinguser
    alaa@aa-lu:~$ sudo passwd testinguser
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: password updated successfully
    alaa@aa-lu:~$ sudo ls -l /home
    total 20
    drwxr-xr-x 55 alaa alaa  4096 Aug 22 22:00 alaa
    drwx------  2 root root 16384 Jun  5 09:46 lost+found
    alaa@aa-lu:~$ sudo mkdir /home/testinguser
    alaa@aa-lu:~$ sudo chown testinguser:testinguser /home/testinguser
    alaa@aa-lu:~$ ls -l /home
    total 24
    drwxr-xr-x 55 alaa        alaa         4096 Aug 22 22:00 alaa
    drwx------  2 root        root        16384 Jun  5 09:46 lost+found
    drwxr-xr-x  2 testinguser testinguser  4096 Aug 23 10:03 testinguser
    alaa@aa-lu:~$ ls -l /home/testinguser/
    total 0
    alaa@aa-lu:~$
6
  • 1
    Are there any errors in /var/log/auth.log?
    – yaegashi
    Commented Jul 11, 2015 at 8:37
  • what the grep testinguser /etc/passwd output?
    – Jakuje
    Commented Jul 11, 2015 at 9:03
  • Jul 11 18:39:39 kali gdm3][3693]: pam_unix(gdm3:auth): authentication failure; logname= uid=0 euid=0 tty=:1 ruser= rhost= user=testinguser Commented Jul 11, 2015 at 13:16
  • testinguser:x:1000:1001::/home/testinguser:/bin/sh Commented Jul 11, 2015 at 13:18
  • 2
    1000:1001 is strange. Commented Jul 11, 2015 at 14:19

1 Answer 1

2

useradd only copies the content of /etc/skel when you set the -m option to create the home directory and use the -k option.

You have to do that manually now with cp /etc/skel/.[a-z]* /home/testinguser/. Don't forget to set correct owner of the files:

chown -R testinguser:testinguser /home/testinguser

In Debian based systems adduser is easier to use, as it uses more defaults and runs interactively.

The 1000:1001 disparity seems problematic.

Give the results of

grep '1000\|1001\|testinguser\|alaa' /etc/passwd

and

grep '1000\|1001\|testinguser\|alaa' /etc/group

to see what happened there.

Then set the password to something unproblematic like "456" to rule out this problem.

5
  • It still gives authentication failure Commented Jul 11, 2015 at 13:14
  • I added the chmod and the password rule out. Commented Jul 11, 2015 at 14:09
  • thank you that seems to have worked, but is there a good source where I can know why I need to do the 2 greps you mentioned Commented Jul 11, 2015 at 15:07
  • The greps did not solve something. It was just for getting information about your problem. I was asking you to post the results of the greps. Commented Jul 11, 2015 at 15:09
  • grep '1000\|1001\|testinguser\|alaa' /etc/group testinguser:x:1000:1001::/home/testinguser:/bin/sh grep '1000\|1001\|testinguser\|alaa' /etc/group inetsim:x:1000: testinguser:x:1001: Commented Jul 17, 2015 at 8:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .