LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 08-28-2006, 03:48 AM   #1
joaoPinto
LQ Newbie
 
Registered: Aug 2006
Posts: 4

Rep: Reputation: 0
su password problem


Hello all,

I just installed Gentoo and after that i came up with this problem:

login as root I have no problem.
login as user I have no problem.

su to user from root I have no problem.
su to root from user I have a password authentication problem:

su: Permission denied
Sorry.

My password is as simple as it gets, with no special characters.
I also read the previous thread about this problem and my etc/su file permitions are u+s.

I have PAM installed and its contents are:

#%PAM-1.0

auth required pam_env.so
auth sufficient pam_unix.so likeauth nullok
auth required pam_deny.so

account required pam_unix.so

password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
password sufficient pam_unix.so nullok md5 shadow use_authtok
password required pam_deny.so

session required pam_limits.so
session required pam_unix.so
/etc/pam.d/system-auth lines 1-14/14 (END)

Can anyone help me here? I am a newbie so any help would be really helpfull.

Thanks in advance

Joao Pinto
 
Old 08-28-2006, 04:01 AM   #2
Centinul
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 552

Rep: Reputation: 30
Is your user a part of the "wheel" group? To check run the command "groups" when you are logged in as the user to see the groups you are in. Then just run (I think): gpasswd -a wheel USERNAME.

Hopefully that helps.

Last edited by Centinul; 08-29-2006 at 04:02 AM.
 
Old 08-28-2006, 04:56 AM   #3
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK - South Coast.
Distribution: Ubuntu (usually the latest....)
Posts: 2,672
Blog Entries: 9

Rep: Reputation: 45
Quote:
Originally Posted by Centinul
Is your user a part of the "wheel" group? To check run the command "groups" when you are logged in as the user to see the groups you are in. Then just run (I think): usermod -G wheel USERNAME.

Hopefully that helps.
From memory (of when I had gentoo installed), having the user in the wheel group just means that the user can issue the "su" command to change to root, surely it would be the other way round i.e. that root is also a member of the wheel group ??? because to "su" in root is attempting to su from root to root. Could that be why joaoPinto is being given the "permission denied" error ???

Or is it that joaoPinto is forgetting that when you are "su' ing" back from root to user, you would normally do su joaoPinto or whatever other username is used.

I may well be talking a load of bollocks. It's just that root has (or is supposed to have) overall control of the system. If the user wasn't in the wheel group, then the command su just responds with "command not known" (or it did when I last had gentoo installed).

So hence, I'm wondering if the command to switch back from root to user is being issued correctly
Code:
su username
as oppossed to just
Code:
su
which from root, well the system wouldn't know where to "su" too because it's already in root.
 
Old 08-28-2006, 05:21 AM   #4
joaoPinto
LQ Newbie
 
Registered: Aug 2006
Posts: 4

Original Poster
Rep: Reputation: 0
a thousands thanks you's

tha problem was the wheel groups that needed to be in my users' list.

i did

usermod -G wheel username

as root and everything went fine.

Thanks you both, specially Centinul

J
 
Old 08-28-2006, 10:46 AM   #5
Baix
Member
 
Registered: Jun 2004
Distribution: Gentoo, LFS, Slackware
Posts: 203

Rep: Reputation: 30
A word of caution...using usermod -G makes the user a member of only the specified groups. If the user belonged to any other groups but you didn't include them then the user will no longer belong to them.

Next time use
Code:
gpasswd -a wheel <username>

Last edited by Baix; 08-28-2006 at 10:47 AM.
 
  


Reply

Tags
password, su


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
Password problem novice7 VectorLinux 5 11-15-2005 07:58 AM
password problem on 9.2 mfds Linux - Security 4 04-16-2004 11:28 PM
su password problem gshok108 Linux - General 3 01-02-2004 07:44 AM
Password Problem L33t Linux - Newbie 1 10-09-2003 11:03 PM
password problem with RH 8 davez530 Linux - Newbie 1 06-12-2003 01:26 AM


All times are GMT -5. The time now is 03:38 AM.

Main Menu
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