[Kc] Shell script to execute system command as another user
David Dumler
DDumler at jccc.net
Mon May 3 12:00:35 CDT 2004
There is also an interface to sudo available on cpan. I have never used it
nor do I know how well it works, but it is there if you want to try it out
and let us know.
-David
-----Original Message-----
From: kc-bounces at mail.pm.org [mailto:kc-bounces at mail.pm.org]On Behalf Of
Brad
Sent: Monday, May 03, 2004 11:52 AM
To: Andrew Moore
Cc: kc at mail.pm.org
Subject: Re: [Kc] Shell script to execute system command as another user
On Mon, 2004-05-03 at 10:21, Andrew Moore wrote:
> On Mon, May 03, 2004 at 09:25:40AM -0500, Brad wrote:
> > How can I set up a perl script that will be owned and executed by nobody
> > (executed through apache) that will then execute a shell command as the
> > user cyrus?
>
> A popular method seems to be to use "sudo". You can give 'nobody'
> permissions to run a certain command as 'cyrus', perhaps without a
> password, in the /etc/sudoers file, I believe.
>
> That seems to be better than making the shell script (or command) suid
> cyrus for some reasons.
>
> Hope it helps.
>
> -Andy
So you think this is a 'safer' alternative than suid? I will check this
out. I am going to look at the suid options also. Thanks to John for
that advice as well.
Brad
_______________________________________________
kc mailing list
kc at mail.pm.org
http://mail.pm.org/mailman/listinfo/kc
More information about the kc
mailing list