Forum: CFEngine Help
Subject: Re: commands with setuid environment
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,23529,23551#msg-23551

bbomgardner Wrote:
-------------------------------------------------------
> This works ok in CFEngine you just can't assign
> the user with a contain body.  Otherwise, su -
> user will run as the user and prompt for a
> password (which I think is what was happening to
> you, Neil).

That's a good point.  I suppose one could use the contain body and just make 
the command something like

/bin/bash -l -c "/path/to/command arg1 arg2"


or write a wrapper that allows you to specify argv[0] as the shell name 
starting with a - (ie, /bin/ksh would be "-ksh") to make the shell act like a 
login shell.

_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to