LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 07-15-2002, 10:28 AM   #1
progster
Member
 
Registered: Feb 2002
Distribution: ubuntu
Posts: 76

Rep: Reputation: 15
su -> permission denied


When I use su I always get "permission denied. sorry", I'm sure I typed the right password and the keymap is the right one....

What else could cause this?

~Progster
 
Old 07-15-2002, 10:39 AM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
The capslock? The password is case sensitive, try typing it in a different case, or if it's a 'proper' word, try making the first letter a capital letter...
 
Old 07-15-2002, 10:44 AM   #3
progster
Member
 
Registered: Feb 2002
Distribution: ubuntu
Posts: 76

Original Poster
Rep: Reputation: 15
nope, caps lock is off...

~Progster
 
Old 07-15-2002, 10:57 AM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Look for any clues in /etc/pam.d/su
this is the stock unmodified RedHat 7.3
Code:
#%PAM-1.0
auth       sufficient   /lib/security/pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth       sufficient   /lib/security/pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth       required     /lib/security/pam_wheel.so use_uid
auth       required     /lib/security/pam_stack.so service=system-auth
account    required     /lib/security/pam_stack.so service=system-auth
password   required     /lib/security/pam_stack.so service=system-auth
session    required     /lib/security/pam_stack.so service=system-auth
session    optional     /lib/security/pam_xauth.so
 
Old 07-15-2002, 11:18 AM   #5
progster
Member
 
Registered: Feb 2002
Distribution: ubuntu
Posts: 76

Original Poster
Rep: Reputation: 15
Code:
bash-2.05a$ cat /etc/pam.d/su
#%PAM-1.0

auth       sufficient	/lib/security/pam_rootok.so
auth       required	/lib/security/pam_wheel.so use_uid
auth       required	/lib/security/pam_stack.so service=system-auth

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

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

session    required	/lib/security/pam_stack.so service=system-auth
session    optional	/lib/security/pam_xauth.so
It is an other distro of course, but I believe everything is there...

Could it be my user isn't part of a required group? it is only part of the users group at the moment, if this is it how do I make my user part of other groups? (I believe I need to add it to the "wheel" group)

~Progster

Last edited by progster; 07-15-2002 at 11:19 AM.
 
Old 07-15-2002, 11:41 AM   #6
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
I prefer editing /etc/group make the entry for wheel look like this

wheel:x:10:root,username,another_user_name

Or you can comment out with a hash sign (#) /etc/pam.d/su entry
auth required /lib/security/pam_wheel.so use_uid

B/c it is in requred section - you are right if you are not in the wheel group you can't su.
 
Old 07-15-2002, 11:47 AM   #7
progster
Member
 
Registered: Feb 2002
Distribution: ubuntu
Posts: 76

Original Poster
Rep: Reputation: 15
thx for the help.

I added myself to the wheel group (in my opinion more secure then the other option) and everything works now!

but I've got another question: are there any other groups a user should be part of (I guess it might depend on the distro)?

~Progster

Last edited by progster; 07-15-2002 at 11:49 AM.
 
Old 07-15-2002, 11:53 AM   #8
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
There are also other obsticles along the way, if security level is set too high you won't be able to login as root in KDM/GDM/XDM, then you need to login as a regular user and use one of the virtual consoles accessed by pressing Ctrl-Alt-F1 through F6 keys, and login as root from there, with the systems set in paranoid mode you won't be able to get to the root by that method either, then I suggest booting into runlevel1 using
linux single
at lilo boot prompt accessed by pressing Ctrl-X during lilo graphical menu. And still there are possibilities not being able successfuly login as root if the delay for LILO is set to 0 seconds.
I hope in your case you won't have to struggle your way through all this.
Cheers
P.S. I threw all this here because you will need to be root to isue commands like
usermod -G gid username (to add user to wheel group gid=10 usually), to edit /etc/group by hand you need root rights, edit /etc/pam.d/su you need root as well. And sometimes it is vey hard to get to the root on paranoid security level system - Mandrake is doing it all the time.

Last edited by neo77777; 07-15-2002 at 11:55 AM.
 
Old 07-16-2002, 01:35 PM   #9
aredshaw
LQ Newbie
 
Registered: Jul 2002
Posts: 12

Rep: Reputation: 0
one other possibility

It is also possible the root does not have permissions for some services. You can change this if you have kuser. At command line type kuser and then when the screen comes up double click on root. Select the groups tab and then make sure that everything is checkmarked. I have run into this issue myself where some service was not accessible under root. This should solve the issue.
 
Old 06-28-2007, 12:36 PM   #10
FreedomFighter
LQ Newbie
 
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by progster
thx for the help.

I added myself to the wheel group (in my opinion more secure then the other option) and everything works now!

but I've got another question: are there any other groups a user should be part of (I guess it might depend on the distro)?

~Progster
Had the same issue. The user your logged in as must be in the wheel group to su.

note that the user does not have to be in the wheel group if you set up the user to use commands in the sudo file "visudo"

For security reasons only allow users in which you would like the ability to use root to the wheel group.
 
  


Reply



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
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
Permission Denied jamesvenning1 Linux - Newbie 4 06-05-2005 11:32 AM
Permission denied jagman026 Fedora 3 01-01-2005 03:45 PM
Permission Denied ptreves Linux - Newbie 7 12-16-2004 02:14 PM
Permission denied? jbhoo Linux From Scratch 1 04-27-2002 09:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:43 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
Open Source Consulting | Domain Registration