LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "su - root" giving incorrect password but normal root login works. ?? (https://www.linuxquestions.org/questions/linux-newbie-8/su-root-giving-incorrect-password-but-normal-root-login-works-656867/)

arashi256 07-19-2008 02:34 PM

"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.

brianL 07-19-2008 02:38 PM

Think it should be just su root or su -.

arashi256 07-19-2008 03:23 PM

Quote:

Originally Posted by brianL (Post 3220104)
Think it should be just su root or su -.

Regardless, it still doesn't work.

{BBI}Nexus{BBI} 07-19-2008 05:03 PM

Quote:

Originally Posted by arashi256 (Post 3220120)
Regardless, it still doesn't work.

Try just using su.

eggixyz 07-19-2008 09:06 PM

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

Tinkster 07-19-2008 09:09 PM

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

arashi256 07-22-2008 04:49 PM

Thanks, I'll look into that. Odd error, though. Wish I knew more about this stuff.

Tinkster 07-22-2008 06:09 PM

You will when you're done with it ;}

That's how I learn.

leesan 06-01-2010 11:01 PM

Thanks,eggixyz .
 
I see.#chmod 4755 /bin/su,it can do work.
Thanks, eggixyz .

aarsh 06-02-2010 12:29 AM

# passwd root
and then change your root passwd.
though it illogical just give it a shot

eggixyz 06-03-2010 03:13 AM

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.