I've just set up a minimal install on my netbook (the default was too resource hungry, so I figured I'd customize the install and learn something about linux at the same time!)

No problems logging in as root, but when I create a new user and try to login as them I just get the "Login incorrect" error. I'm certain the password is correct, though the secure log displays an authentication error. Am I missing a permission somewhere?

useradd test
usermod -p [pwd] test

Shell is added automatically I think (checking password file says shell is /bin/bash) I've tried adding the user to the sudo-ers group usermod -a -G wheel which doesn't help. I've kept the password simple in order to rule out human error.

1 Answer 1


First: EDIT: original post edited to clarify, just a typo

Second: passwd is recommended before usermod -p (read man usermod) (if passwd is available on your system, of course, maybe it isn't (though I don't know a mainstream Linux where this isn't the case)).

Third: usermod -p does not take the cleartext password! Read man usermod. If you look in /etc/passwd, you'll see the password you entered with usermod -p in clear text, but when you try to log in it will be assumed that the password entry is encrypted.

  • Your assumption is correct. Thanks for the suggestions, I'll be able to try them later. Apr 4, 2012 at 10:25
  • Wow, now I realise what a silly question that was, using "passwd" solved my problem. Thanks for your help! Apr 5, 2012 at 7:37

You must log in to answer this question.

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