in reply to Executing Root Commands from user level
A much better solution (IMO) is to create a script that has the group suid set (that is "rwxrws---"), created by root, with the group containing only those people that you want to be able to run the script from their accounts. The suid bit allows programs that require access to root-level resources to temporarily gain them, and is typically used for direct interaction with the hardward (like X) or with the lower ports (like httpd). But since it has that power, you want to limit who can run it, particularly if you are on a shared-user box. This script can be done in perl, but based on what you have above, it can be as simple as this shell script
Do note that you have to have your root user create this and set the bits and set up the group appropriately. A non-root user can't (or shouldn't, at least) be able to grant suid status to a file.#!/bin/sh /www/apache/bin/apachectl start
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Executing Root Commands from user level
by arhuman (Vicar) on Jan 18, 2002 at 20:36 UTC | |
by Masem (Monsignor) on Jan 18, 2002 at 20:50 UTC | |
by arhuman (Vicar) on Jan 18, 2002 at 21:10 UTC | |
by FoxtrotUniform (Prior) on Jan 18, 2002 at 21:17 UTC | |
by Masem (Monsignor) on Jan 18, 2002 at 21:31 UTC |