Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running root commands as a non-root user.

Status
Not open for further replies.

jping45

Technical User
Aug 22, 2001
49
US
I have a menu script which will allow our computer operators to run various tasks. One of these tasks I'd like them to be able to perform is to poweroff our nodes. Does anyone know how to allow them to run root commands without having them be part of the admin group or without having them gain root access? I've tried to use the following command, "su - root -c $passwd "command here". However, I can't seem to get around having to manually enter the passwd for root. Is there a way to pass the passwd without having to type it manually?

Any help/info would be greatly appreciated.
Regards
Jake
 
Hi Jake,

I have written a 'C' program (running on SunOS 2.6) to do precisely this and it is both reliable and robust. It works using a user list and a command list. The user list either contains just the user name (giving them access to all commands)or additionally, a command alias (thereby giving access to that command only). The command list contains a command alias and the full path to the actual command.

This utiliy runs as root for the duration of the command and all usage is logged, giving full audit details.

I'd be interested in selling this commercially but never really had the time.

Interested?


Adam
 
See the FAQ below for help on configuring sudo:

faq80-1623 Adam F
Solaris System Administrator
 
rwb1959 and Adam F.
Thanks for the info on sudo...
I've downloaded it and its working like a charm.
Thanks again

Jake
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top