I created a new user. Added all the groups that the "pi" user belonged to. When I try to login with that user, it just keeps recycling back to the login.

If I login with the user "pi", I can su to the user with the same password.

What am I missing?

  • 1
    What operating system are you using? – Jacobm001 Aug 17 '17 at 17:48
  • 1
    What was the exact set of commands you've used? – Jacobm001 Aug 17 '17 at 17:50
  • 1
    It's also worth noting that when you use su with administrator rights (like the default pi user has) you don't need to use their password. – Jacobm001 Aug 17 '17 at 17:50
  • 1
    What does the user's entry in /etc/passwd look like? – stevieb Aug 17 '17 at 19:34
  • Its very confusing, but adduser and useradd are very different. adduser creates the home directory and sets up password and defaults, useradd just adds the entry in /etc/passwd – crasic Sep 12 '17 at 22:16

First, delete the user created.

Next, I type $ groups pi to check the group's user pi belong. Then I create a new user with the command

$ useradd -m -G [groups from user pi except for pi and sudo] username.

The -m option creates a home directory and -G [groups] option adds the user to those groups. Set up a password to the new user with

$ sudo passwd username.

After that, log out and log in to the new user account. You can find more specific steps on this website.

| improve this answer | |

I had the same problem:

  1. check if the home folder has been created (it was missing)

  2. check the passwd file sudo nano /etc/passwd (the bash was missing)

there should be a line like this:


(my user is paolo)

Else try deleting and recreating the user, it worked for me!!

Hope it helps!

| improve this answer | |

su on its own defaults to the root user. If you use su - username, then it will try to login to that user.

| improve this answer | |
  • Thanks but that is what I did and it works. what does not work is login at boot! – Guy Morazain Aug 17 '17 at 17:31
  • Are you sure you are using the correct password? – The Puzzlemaker Aug 17 '17 at 17:31
  • yes that's why i tested it with su – Guy Morazain Aug 17 '17 at 17:32
  • Do you remember the exact useradd command you used? – The Puzzlemaker Aug 17 '17 at 17:33
  • yes. adduser newuser – Guy Morazain Aug 17 '17 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.