in reply to su to user in a cgi script
This will run the predetermined command as the supplied username. You most defenitly want to use taint here, and probably find a way to do things differently, so that you won't have to mess with the permissions at all.if ($action eq 'Click to Send'){ exec("/path/to/sudo","-u",$user,"/path/to/predetermined/command"); }
-- Dan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: su to user in a cgi script
by Silicon Cactus (Scribe) on Sep 20, 2002 at 17:21 UTC | |
by virtualsue (Vicar) on Sep 20, 2002 at 18:04 UTC |