The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sudo question melias Security 12 05-26-2008 04:10 AM
sudo, or not sudo: that is the question iBot UNIX and Linux RSS News 1 02-07-2008 01:40 PM
Sudo question Zarnick Linux 2 01-22-2008 08:25 AM
Sudo question Katkota UNIX for Dummies Questions & Answers 10 01-18-2008 05:35 AM
sudo question TRUEST UNIX for Dummies Questions & Answers 1 01-17-2004 12:53 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-10-2005
sajjad02 sajjad02 is offline
Registered User
  
 

Join Date: Sep 2004
Posts: 8
SUDO question - please help

Hi, I was wondering if someone can give me some pointers about configuring SUDO. I am trying to configure SUDO to have about 30 users run about 200 scripts as a different user. I understand that I can create an User_Alias but how do I give that User_Alias rights to run all the scripts in a certain directory? We add scripts to that directory every week and don't want to keep a static Cmnd_Alias . Does that make sense? Your help is appreciated very much.

Jake
  #2 (permalink)  
Old 02-11-2005
locustfurnace locustfurnace is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2004
Posts: 232
Why not make a group; [scripts], add those users who are permitted to run these scripts to this group. Then they can just su to that group to run those scripts.
Everytime you create a new script, just change the owner to that group.
  #3 (permalink)  
Old 02-11-2005
sajjad02 sajjad02 is offline
Registered User
  
 

Join Date: Sep 2004
Posts: 8
Pardon my ignorance, but how do you su to a group? One can SU to another user but how does that work for a group?
  #4 (permalink)  
Old 02-11-2005
locustfurnace locustfurnace is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2004
Posts: 232
Yes. Correction.

My mistake, I usually create a dummy user, such as script, which is usually in a group called script, then I just su script.

You would need to use the command newgrp to change to a different group.
  #5 (permalink)  
Old 02-12-2005
Phantom Phantom is offline
Registered User
  
 

Join Date: Feb 2005
Location: Holon, Israel
Posts: 26
create wrapper script which will change to the directory where your scripts reside and run specified script (input parameter) from the current directory (so, that wrapper limits running scripts from specific directory). Wrapper owner must be root and permissions must be set to 700.
In sudo configuration you will need to define permissions only for the wrapper script.
Your users wil run scripts in following manner:

mypath/mywrapper myscript parm1 parm3 .... parmN
  #6 (permalink)  
Old 04-27-2005
chuckuykendall chuckuykendall is offline
Registered User
  
 

Join Date: Apr 2005
Location: McKinney, TX
Posts: 11
Quote:
Originally Posted by sajjad02
I understand that I can create an User_Alias but how do I give that User_Alias rights to run all the scripts in a certain directory?
Use this syntax to allow sudo access to an entire directory:

Code:
User_Alias  Host_Alias = (ALL) directory/
where
User_Alias is your User_Alias, userid, group, netgroup, or ALL
Host_Alias is your Host_Alias, host, netgroup, or ALL
directory is the directory conatining all your scripts

The key to this is to make sure to put the slash ( / ) on the end of your directory entry, as in " /usr/global/bin/ "
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0