[TriLUG] running script as mail alias, script running as specific user

Tanner Lovelace lovelace at wayfarer.org
Mon Jan 14 17:00:14 EST 2002


Jon,

Not a solution, but just a plug for a different mailer... :-)
Qmail automatically runs scripts as the user it's being
delivered to...  I don't think sendmail does that by
default, if it can do it at all... 

A little more on topic, someone suggested suidperl, but
I noticed Jon didn't say whether the script was perl or shell,
or python or whatever, so that might not work.  I don't think
making it suid will work for a shell script because it's actually
the shell that runs and not the script (which is interpreted
by the shell), so you might need a wrapper (sort of like
suexec that apache provides...).

Tanner

On Mon, 2002-01-14 at 16:41, Jon Carnes wrote:
> I'm trying to setup an automated process using a email address.  The email
> alias is something like:
>   thetrees:  "|/usr/local/sbin/thetrees"
> 
> The script thetrees in /usr/local/sbin needs to run as a specified user.
> The user should be "lorax".  How do I let the lorax speak for thetrees?
> 
> I've tried using chmod u+s on the script, and setting the user to lorax, but
> that is not working.
> 
> I've setup scripts to run as specific users in the past, so I know that it
> can be done.  But right now, I'm just sitting here knitting thneads and
> coming up blank.  <If I don't get this done soon, the Barbaloots will be in
> trouble...>
> 
> Jon
> 
> _______________________________________________
> TriLUG mailing list
> http://www.trilug.org/mailman/listinfo/trilug
-- 
Tanner Lovelace | lovelace at wayfarer.org | http://wtl.wayfarer.org/
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
GPG Fingerprint = A66C 8660 924F 5F8C 71DA  BDD0 CE09 4F8E DE76 39D4
GPG Key can be found at http://wtl.wayfarer.org/lovelace.gpg.asc
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
 Those who are willing to sacrifice essential liberties for a little 
 order, will lose both and deserve neither.  --  Benjamin Franklin 

 History teaches that grave threats to liberty often come in times
 of urgency, when constitutional rights seem too extravagant to 
 endure.  --  Justice Thurgood Marshall, 1989 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://www.trilug.org/pipermail/trilug/attachments/20020114/2f23a612/attachment.pgp>


More information about the TriLUG mailing list