LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-02-2004, 11:23 PM   #1
caged
Member
 
Registered: Jan 2004
Location: new zealand
Distribution: Mandrake,Slackware
Posts: 165

Rep: Reputation: 30
stopping a user from using the su command


hi.

anyone know how i could removethe su command from selective users?

cheers.
Ben.
 
Old 06-02-2004, 11:50 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You could always just not tell anyone the root password... and let users know that calls to root are logged, with the log reviewed dayly.

This always works for me.

Otherwise there is no point blocking specific users, after all, if they have to log on in the first place, they could always try logging on as root!

Simon
 
Old 06-03-2004, 12:52 AM   #3
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Slackware installs a program called sudoers.............
here is the man page.............

http://man.linuxquestions.org/index....ction=0&type=2
 
Old 06-03-2004, 03:33 AM   #4
Chris H
Member
 
Registered: Aug 2003
Location: Farnborough, UK
Distribution: Zenwalk
Posts: 288

Rep: Reputation: 30
I think you can remove them from the users or wheel groups, if you have them. Least that worked in Gentoo for me. Didn't mean to, I just messed up and removed myself from those groups by mistake. Only realised when I got permission denied when I tried to su.
 
Old 06-03-2004, 12:52 PM   #5
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
This should do the trick. Put it in /etc/sudoers

Code:
root:ALL EXCEPT GROUP root:DENY
Okay, that lovely smiley face is actually part of the code. A colon followed by a capital D

Last edited by darthtux; 06-03-2004 at 12:54 PM.
 
Old 06-03-2004, 01:06 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Another easy way for PAM-ified distro's is to deny specific ppl to use <service> is use something like pam_listfile.
 
  


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
run command as user BFEINZIMER Linux - Newbie 9 08-24-2005 10:21 PM
user can use command.. bruse Mandriva 2 04-12-2005 07:21 AM
what is the command to make a user change their password after creating a new user? naweenio Linux - Newbie 7 01-05-2005 07:07 AM
stopping a command-line program from python kernelpanicguy Programming 0 09-08-2003 03:29 AM
execute command as different user kilobravo Linux - General 2 06-02-2003 10:03 AM

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

All times are GMT -5. The time now is 11:14 AM.

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