On 30/11/14 19:09, Ewan Slater wrote:
Hi All,
I have a situation is driving me round the twist. I can't log in with (or su to) any new user I create.
Background: I have had to take over a box built by someone else (who is no longer available to speak with). The easy answer would be to rebuild said box, but we currently have a customer on it, and so that is not an option at the moment.
Problem: I need to create a couple of new users. I ssh'd into the box with an existing account, su'd to root and created the new users with useradd, and set passwords for them.
If I attempt to log in as one of these users, or from the existing account (not root) I attempt to su - <username> then I get incorrect password (and I have checked what I am typing very carefully).
I have checked /etc/passwd and the users have a valid shell (/bin/bash) and a valid home directory.
From root I have used passwd -u to make sure that they are not locked.
I had a look at bashrc, bash_profile, /etc/profile and can’t see anything that would cause the user to be locked out.
Any ideas gratefully received.
My first thoughts were to create a user with no password and see if you can log into that. Also, if you create a user with the same password as an account that works, does this create the same password hash in the /etc/shadow password file?
Are all the user, group and password files have sensible permissions & owners & groups? Do the newly created user's directories have files and directories owned by the newly created user?
A bit of googling gave this: https://unix.stackexchange.com/questions/64545/suddenly-i-cant-login-with-co...
and this http://ubuntuforums.org/showthread.php?t=2115288
Which suggest it might be something to do with Samba and or Pam-auth.
I'm not sure about the suggestion to do ppa-purge, but the pam and samba suggestions may help.
Good luck!
Steve