![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sudo question | melias | Security | 12 | 05-26-2008 01:10 AM |
| sudo, or not sudo: that is the question | iBot | UNIX and Linux RSS News | 1 | 02-07-2008 10:40 AM |
| Sudo question | Zarnick | Linux | 2 | 01-22-2008 05:25 AM |
| Sudo question | Katkota | UNIX for Dummies Questions & Answers | 10 | 01-18-2008 02:35 AM |
| sudo question | TRUEST | UNIX for Dummies Questions & Answers | 1 | 01-16-2004 09:53 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
Quote:
Code:
User_Alias Host_Alias = (ALL) directory/ 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/ " |
|||
| Google The UNIX and Linux Forums |