LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-20-2006, 08:39 AM   #1
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 38
Blocking access on a particular app (via sudo)


I would like to block anyone from using 'su' across the board for anyone in the sudoers file. How do I do this?

Thanks,

Harlin Seritt
 
Old 10-20-2006, 04:37 PM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
http://www.unet.univie.ac.at/aix/cmd...ds1/chuser.htm this looked like what you might need.
 
Old 10-21-2006, 02:34 AM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I could be misinterpreting your question, but su and sudo are very different things. The easiest way to limit su usage is in the /etc/suauth file. The man page has more info...
 
Old 10-21-2006, 07:38 AM   #4
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Original Poster
Rep: Reputation: 38
Yes they are different. What I'm wondering is how can you stop anyone from doing this successfull:
# sudo su

?

Thanks for the help!

Harlin
 
Old 10-21-2006, 07:40 AM   #5
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Original Poster
Rep: Reputation: 38
Oh sorry meant to include this in the post... there isn't a suauth file in /etc/ on my box.
 
Old 10-21-2006, 01:59 PM   #6
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Never really done anything like this before but couldn't you find the command and just change the permissions on the su command. So that is not executable.
 
Old 10-21-2006, 02:30 PM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Quote:
Originally Posted by Harlin
Oh sorry meant to include this in the post... there isn't a suauth file in /etc/ on my box.
That's not a problem - there wasn't one on mine either. Once I created it, it was used by su.
 
Old 10-21-2006, 02:41 PM   #8
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Original Poster
Rep: Reputation: 38
What kind of entries should i put in suauth to make this work?

thanks,

Harlin
 
Old 10-21-2006, 02:51 PM   #9
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The easies method is a default deny and only allow specific users. For example, to only allow the user steve to su to root:
Code:
root:ALL EXCEPT steve:DENY
I also have the permissions set so that only the root user can view/modify the file:
Code:
$ ls -l /etc/suauth
-rw-r----- 1 root root 27 2006-08-20 19:22 /etc/suauth
Users can still su to other users with this particular configuration - I only limit being able to su to root.

Last edited by gilead; 10-21-2006 at 02:52 PM.
 
Old 10-22-2006, 08:07 AM   #10
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Original Poster
Rep: Reputation: 38
Hey thanks!! One thing I'm wondering: if i'm wanting to deny many users besides Steve, how would I delimit the entries? comma? space?

Thanks!

Harlin
 
Old 10-22-2006, 02:11 PM   #11
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Commas - I recommend reading the man page for suauth. It's explained well and there are examples.
 
  


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
blocking access by region? vbsaltydog Linux - Security 6 04-24-2006 10:04 AM
secure root access with SUDO dussel Linux - Security 4 02-15-2006 08:26 AM
can't run app w/ sudo command fatblueduck Linux - Software 2 09-30-2005 07:39 PM
Sudo access to particular directories angrybeaver Linux - Software 0 09-23-2004 01:39 AM
How can I tell what is blocking access to my homepage Bjorkli Linux - Networking 0 09-14-2004 05:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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