"su - root" giving incorrect password but normal root login works. ??
If I login as a normal user and then do "su - root", it always tells me the password is incorrect....but I can login as root with this password just fine - just not switch to root from another user. Obviously, this used to work fine in the past. I've changed my root password using the "passwd" command, but this makes no difference.
What have I broken and how can I fix it? Thanks. |
Think it should be just su root or su -.
|
Quote:
|
Quote:
|
Yeah,
This is most likely an issue with su. Check the permissions on it. It might be set up with 4750, or something, so that only members of a wheel group can use it, or even more restricted. It also might not be setuid root, which it needs to be for non-root users to use it. Best wishes, Mike |
Did you do any recent updates or config changes? Have a
look at the varied logs in /var/log, best candidates being syslog or secure. Chances are it's a problem with pam or your login.defs, maybe securetty (the latter two under /etc directly, pam depends on distro - try 'find /etc -iname \*pam\*' ). Cheers, Tink |
Thanks, I'll look into that. Odd error, though. Wish I knew more about this stuff.
|
You will when you're done with it ;}
That's how I learn. |
Thanks,eggixyz .
I see.#chmod 4755 /bin/su,it can do work.
Thanks, eggixyz . |
# passwd root
and then change your root passwd. though it illogical just give it a shot |
Good news,
I'm glad it's working for you now. If it's still confusing, the chmod you did made the su command setuid root. That means that when anyone runs that command (su), the command will actually execute as the root user. The reason su needs this is because it has to check your password, and, although any user can generally check the /etc/passwd file to get information from their, the /etc/shadow file is (or should be ;) protected so that only root can read it. Hope that helps out, and glad to hear you're doing okay! , Mike |
All times are GMT -5. The time now is 07:55 AM. |