3

I created a user in terminal by

useradd xyz

I'm able to log in from the terminal but not in the GUI.

What is wrong?

Melebius
  • 11,750
mairaj
  • 31

1 Answers1

6

This might be because useradd didn't create a home directory for your new user. You should use

adduser xyz

instead and avoid using useradd since it is a backend command needing more input.

See also this answer, man useradd and man adduser.


Or if you still want to use useradd use at least

useradd -m xyz

to create a home directory. But this still might be insufficient.


Before starting now you might want to remove the user you created wrong by

userdel xyz

so you can create it again correctly without problems.


Anyway:
If you have a GUI it might be easier to just use the GUI for adding the new user (usually somewhere in System-settings -> Accounts). This might also solve some problems with usergroups which might appear as @Videonauth pointed out.

derHugo
  • 3,376
  • 5
  • 34
  • 52