The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sudoers tjmannonline UNIX for Dummies Questions & Answers 4 05-13-2008 06:45 PM
Sudoers problems. blane UNIX for Advanced & Expert Users 5 04-09-2008 02:18 PM
sudoers on HP 11.11 dhlopomo UNIX for Dummies Questions & Answers 2 01-18-2008 03:03 AM
sudoers file whatisthis Linux 4 12-02-2004 02:59 PM
/etc/sudoers is mode 0660 pneumeric UNIX for Dummies Questions & Answers 4 10-08-2003 10:14 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-27-2005
Registered User
 

Join Date: Apr 2005
Location: McKinney, TX
Posts: 11
sudoers syntax

I'm stuck with a dilemma. I am trying to control userid's access to the su command in such a way that he will not be able to su to root (su, su -, su root, su - root) but he will be able to su to any other user. I have tried the following syntax:

Code:
userid  ALL=/usr/bin/su ?*, !/usr/bin/su *root*
This catches "su", "su root", and "su - root", but not "su -". I've also tried the follow syntax:

Code:
Cmnd_Alias  SU_TO_ROOT = /usr/bin/su, /usr/bin/su -, /usr/bin/su *root*, /usr/bin/su - *root*
userid  ALL=ALL, !SU_TO_ROOT
This catches all four types of su'ing to root but it also catches all other su attempts, which I would like to leave open. Any suggestions?
Reply With Quote
Forum Sponsor
  #2  
Old 11-11-2005
Registered User
 

Join Date: Nov 2005
Posts: 14
Group Access?

While I've never tried this with *root*, you could make another group called sutoroot and add this to roots list of groups. Then (at least on AIX) you can restrict by group which groups are authorized to su to this user.

Just one thought
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 01:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0