Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 3 down vote accepted

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.

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

You must log in to answer this question.

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