"su - root" giving incorrect password but normal root login works. ??
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
"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.
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.
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\*' ).
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.