[CentOS] Temporary root access to another user.

Sean O'Connell oconnell at soe.ucsd.edu
Mon Aug 22 03:20:07 UTC 2005


On Mon, 2005-08-22 at 03:03 +0000, duffmckagan wrote:
> On 8/22/05, Sean O'Connell <oconnell at soe.ucsd.edu> wrote:
> > You chould set up sudo to just allow users in a particular group to run
> > that command as root. If all your users, login on the console first, you
> > can use consolehelper.

> 
> Can you guide me to setup sudo please?
> I know how to use it (done that only on Ubuntu systems, where all is
> already setup)
> Do I need to add a group called Sudoers?
> 
> Please clarify some things in here.
> I have no idea how to add sudoers. :(

You can do this one of several ways.

Create a unix group called it something meaningful -- say "netsetup".
Put all the users you want to run this command in that group. Then run
the visudo command as root, and add something like

%netsetup	ALL = /path/to/network-setup-script

You'll need to play with this a bit. Alternatively, you can setup a
Cmnd_Alias and User_Alias list in /etc/sudoers using visudo and do it
that way. It just depends on how you want to manage things. The first
lets you setup the sudo portion once and manage access to this command
via a unix group. The second option lets you do all the management via
the visudo command. Look at the examples at the end of the end sudoers
man page (man sudoers) for more on how to use the Cmnd_Alias and
User_Alias directives.

Sean





More information about the CentOS mailing list