LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-25-2004, 06:56 PM   #1
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Rep: Reputation: 45
Can't su into root as normal user


I added a normal user when I first installed Gentoo and I was always able to su to get root access. But recently I have been unable to get root access using su. I have checked my /etc/group and I am in wheel.
Any ideas on how to fix this
Thanks
 
Old 04-25-2004, 07:46 PM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
is su in /sbin or /bin?
 
Old 04-25-2004, 07:52 PM   #3
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Original Poster
Rep: Reputation: 45
/bin
 
Old 04-25-2004, 08:17 PM   #4
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
what actually happens when you use the
su
command? any error messages?
 
Old 04-25-2004, 08:39 PM   #5
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Original Poster
Rep: Reputation: 45
I type in my root password and I get

Quote:
su: Authentication failure
Sorry.
 
Old 04-25-2004, 11:38 PM   #6
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
can you log in as root at all? Say from a text terminal.
 
Old 04-26-2004, 12:13 AM   #7
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
{DELETED}
 
Old 04-26-2004, 08:37 AM   #8
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by quatsch
can you log in as root at all? Say from a text terminal.
Yeh, i can log out of my user account and then log in as root, but not su from the user account.
 
Old 04-26-2004, 12:26 PM   #9
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
I found this:
http://lists.debian.org/debian-user/.../msg00928.html
seems like it's the same problem and has something to do with
/etc/pam.d/su
 
Old 04-26-2004, 02:53 PM   #10
zorba4
Member
 
Registered: Feb 2004
Location: Paris
Posts: 398

Rep: Reputation: 31
In AIX there is an option when creating a user : "user can su" (yes or not), and "another user can asu to this user" (yes or not).
Is there such an option in Linux ?
 
Old 04-27-2004, 09:04 PM   #11
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by quatsch
I found this:
http://lists.debian.org/debian-user/.../msg00928.html
seems like it's the same problem and has something to do with
/etc/pam.d/su
I checked the /etc/pam.d/su file and I don't have the line give by the person the debain mailing list
 
Old 04-28-2004, 03:07 AM   #12
Nishtya
Member
 
Registered: Feb 2004
Location: The armpit of the universe, or at least the armpit of the U.S.
Distribution: PCLinuxOS, Sabayon, Debian & willing to try any noob friendlies
Posts: 170

Rep: Reputation: 30
Admittedly know nothing of Gentoo and am newbie, but are you using KDE? Have you recently upgraded to 3.2.2? There is a known bug:
http://www.kde.org/info/3.2.2.php#binary
Perhaps related?
 
Old 06-10-2004, 03:54 PM   #13
darin3200
Guru
 
Registered: Dec 2002
Distribution: Gentoo!
Posts: 1,153

Original Poster
Rep: Reputation: 45
Sorry for the seriously late reply, I had the problem before kde was installed, I have the following
Code:
#%PAM-1.0
auth       required	/lib/security/pam_rootok.so 
# If you want to restrict users begin allowed to su even more,
# create /etc/security/suauth.allow (or to that matter) that is only
# writable by root, and add users that are allowed to su to that
# file, one per line.
#auth       required     /lib/security/pam_listfile.so item=ruser sense=allow onerr=fail file=/etc/security/suauth.allow

# Uncomment this to allow users in the wheel group to su without
# entering a passwd.
#auth       sufficient   /lib/security/pam_wheel.so use_uid trust

# Alternatively to above, you can implement a list of users that do
# not need to supply a passwd with a list.
#auth       sufficient   /lib/security/pam_listfile.so item=ruser sense=allow onerr=fail file=/etc/security/suauth.nopass

# Comment this to allow any user, even those not in the 'wheel'
# group to su
auth       required     /lib/security/pam_wheel.so use_uid nullok

auth       required	/lib/security/pam_stack.so service=system-auth nullok

account    required	/lib/security/pam_stack.so service=system-auth nullok

password   required	/lib/security/pam_stack.so service=system-auth nullok

session    required	/lib/security/pam_stack.so service=system-auth nullok
session    optional	/lib/security/pam_xauth.so
I have also tried adding the line
Code:
auth       required     /lib/security/pam_unix.so nullock
but this prompts me for the password twice and gives the same error
 
Old 03-18-2010, 12:03 PM   #14
geekgirl16
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
another solution

I found this post while searching for a solution to the same problem. My circumstances were a little different and the solution that worked for me may be relevant to someone else.

My OS is CentOS 5.4 in a production environment with several users who have access to the server for development so adding users to the wheel group in /etc/group is not an ideal solution. We like to try to keep our install as standard as possible across all servers. To that end, here is what I did to troubleshoot

checked permissions on /bin/su. They should be set as setuid...rwsr-xr-x. To make them this way, run chmod u+s /bin/su.

If that works then cat or vi the /etc/pam.d/su file. When I compared this file on the system that didn't work with one that did, I found that the working system had the following line:

#auth required pam_wheel.so use_uid

On the server that didn't work, this line was there but it was not commented out. Changing it to comment it out fixed the issue for me.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Root and normal User help plz LiNuXn00biE_2.4 Linux - Newbie 34 11-08-2004 12:18 AM
no gui for normal/root user.. aaru_ali Suse/Novell 0 10-24-2004 01:37 AM
Root? normal user? what does it all mean? Zieroth Linux - Newbie 5 07-16-2004 05:06 PM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-08-2004 12:11 AM
Root and normal user Smooth Linux - Newbie 4 05-27-2003 11:15 AM


All times are GMT -5. The time now is 01:23 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