1752717 Members
5580 Online
108789 Solutions
New Discussion юеВ

Re: Bad UID ??

 
MikeL_4
Super Advisor

Bad UID ??

I had a user that could not log into the server with his user id which was a UID 500...

Checked the /etc/shadow file and it didn't show as locked. but I ran the usermod -U command on the ID anyway just in case I was missing something...

I then changed the password but user still couldn't log in..... Access denied when entering password.

I then did a userdel and readded with useradd and all was ok with the new UID that was created.... If I tried to change back to uid 500 they couldn't log in....

Any idea what could hag the UID ??
7 REPLIES 7
Ivan Ferreira
Honored Contributor

Re: Bad UID ??

Maybe a problem with the owner/permissions for the home directory.

Maybe a PAM restriction.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
MikeL_4
Super Advisor

Re: Bad UID ??

There has been no changes to the PAM file at all, as a matter of fact no changes to the server in several months now...

This ID that had the UID was working and today just stopped...

They enter there ID when logging in, and fails with access denied ....

I did a userdel, and re-added with a different UID and it worked, I changed the UID tothe old 500 UID and login fails again...
Stephen P. Schaefer
Frequent Advisor

Re: Bad UID ??

Take a look at your PAM config. My /etc/pam.d/system-auth file has

auth requisite pam_succeed_if.so uid >= 500 quiet

Were that '=' sign missing from ">= 500", I'd expect it to behave as you're describing.
Andrew Cowan
Honored Contributor

Re: Bad UID ??

Try usermod and see if the password has been marked as expired e.g. usermod user -e
YYYY-MM-DD.

Also see the chage command
MikeL_4
Super Advisor

Re: Bad UID ??


account sufficient /lib/security/$ISA/pam_succeed_if.so uid < 100 quiet

I tried usermod -U user, tried usermod -e 2010-10-25 user and still can't login with the user id...

As soon as I change the UID to another unused number, I can log in with the user ID
MikeL_4
Super Advisor

Re: Bad UID ??

Looks like it was an issue with failed login attempts.... found a command: faillog, which I ran on the user ID, faillog -e user -r and I was then able to login with the user ID with UID 500....
MikeL_4
Super Advisor

Re: Bad UID ??

Thanks..