LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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



Reply
 
Search this Thread
Old 07-19-2008, 03:34 PM   #1
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 12.04 / CentOS 6.5
Posts: 387

Rep: Reputation: 61
"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.
 
Old 07-19-2008, 03:38 PM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,140
Blog Entries: 52

Rep: Reputation: Disabled
Think it should be just su root or su -.
 
Old 07-19-2008, 04:23 PM   #3
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 12.04 / CentOS 6.5
Posts: 387

Original Poster
Rep: Reputation: 61
Quote:
Originally Posted by brianL View Post
Think it should be just su root or su -.
Regardless, it still doesn't work.
 
Old 07-19-2008, 06:03 PM   #4
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,305

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by arashi256 View Post
Regardless, it still doesn't work.
Try just using su.
 
Old 07-19-2008, 10:06 PM   #5
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
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
 
Old 07-19-2008, 10:09 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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
 
Old 07-22-2008, 05:49 PM   #7
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 12.04 / CentOS 6.5
Posts: 387

Original Poster
Rep: Reputation: 61
Thanks, I'll look into that. Odd error, though. Wish I knew more about this stuff.
 
Old 07-22-2008, 07:09 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
You will when you're done with it ;}

That's how I learn.
 
Old 06-02-2010, 12:01 AM   #9
leesan
LQ Newbie
 
Registered: May 2010
Posts: 1

Rep: Reputation: 0
Thanks,eggixyz .

I see.#chmod 4755 /bin/su,it can do work.
Thanks, eggixyz .
 
Old 06-02-2010, 01:29 AM   #10
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Rep: Reputation: 18
# passwd root
and then change your root passwd.
though it illogical just give it a shot
 
Old 06-03-2010, 04:13 AM   #11
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
root password doesn't work at log in, works using "su" etfd Red Hat 3 01-10-2007 07:38 AM
"su root" fails when I connect with normal user thru SSH AlinFaur Linux - Security 5 02-23-2006 12:26 AM
soundcard works normal only when I login as 'root' dexterwy Fedora 0 12-11-2005 09:49 PM
giving access to use "nice" under non-root renegadeavenger Fedora 1 05-18-2005 11:18 AM
su wont work, cant "su root" as a normal user lukeorun Linux - General 5 10-17-2002 08:25 AM


All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration