-   Linux - Newbie (
-   -   "su - root" giving incorrect password but normal root login works. ?? (

arashi256 07-19-2008 03: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?


brianL 07-19-2008 03:38 PM

Think it should be just su root or su -.

arashi256 07-19-2008 04:23 PM


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 06:03 PM


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

Try just using su.

eggixyz 07-19-2008 10:06 PM


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,


Tinkster 07-19-2008 10: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\*' ).


arashi256 07-22-2008 05:49 PM

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

Tinkster 07-22-2008 07:09 PM

You will when you're done with it ;}

That's how I learn.

leesan 06-02-2010 12:01 AM

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

aarsh 06-02-2010 01:29 AM

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

eggixyz 06-03-2010 04: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 02:46 PM.