3

This is very weird, when add a user using the command line then set a password I cant login using the GUI! is this a new thing or what?

2
  • 3
    Depends on the command used... 1 thing that is important: did you specify a /home?
    – Rinzwind
    Jul 30, 2013 at 10:43
  • No I didn't, I just used useradd with no options
    – Sina
    Jul 30, 2013 at 10:57

2 Answers 2

4

You can add an new user (with the common options, and /home/[user] as home directory) with:

useradd -m -g users -s /bin/bash [user]

and then to set a password:

passwd [user]

EDIT: You can also add additional information about the user with:

chfn [user]
2
  • does this mean that useradd <new user> does not work unless I use the -m -g switches?
    – Sina
    Jul 30, 2013 at 10:52
  • 1
    -m creates you home folder in /home/[user], and -g adds you to the groups users, which I am not sure if is set by default. If you just used useradd [user], then probably you would run into problems, as the GUI requires both. Jul 30, 2013 at 11:17
0

Please check your CapsLock and Language options (must be EN), also check if you have space in the password.

The command for creating new user is:

sudo adduser USERNAME (do not use spaces in the username)

After that you will specify the name of the user. Leave other options blank by push Enter.

2
  • This is exactly what I did, it didn't work
    – Sina
    Jul 30, 2013 at 11:04
  • Then try to change the password. Use comand: sudo passwd username
    – ispasov
    Jul 30, 2013 at 13:45

You must log in to answer this question.

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