[Freeipa-users] problem in sudo policy when target commands use local environment variables

Mitra Dehghan mitra.dehghan at gmail.com
Fri Jun 10 18:08:33 UTC 2016


Dear Paul,
Thanks for your suggestion. It worked.
By the way,  using -i option I had to change sudocmd definition in IPA
SERVER,  to the " /bin/bash -c  /path/to/target_cmd" then after -i option
worked successfully.
Thanks a lot.
On Jun 6, 2016 8:33 PM, "Brennan, Paul J" <Paul.Brennan at itec.suny.edu>
wrote:

> Hi Mitra,
>    I'm not sure if '-H' is the best option for this. If I'm reading the
> documentation correctly, it sounds like that option only sets the value of
> $HOME to ~*srvusr*. You may want to try:
>
> $ sudo -u *srvusr* -i
>
> */path/to/target_cmd *That should run the command using a login shell for
> *srvusr*, instantiating that user's variables.
>
> Good luck,
> Paul Brennan
>
> (Apologies if this ends up in the wrong thread or something, I just signed
> up to this list.)
>
> --
> Manage your subscription for the Freeipa-users mailing list:
> https://www.redhat.com/mailman/listinfo/freeipa-users
> Go to http://freeipa.org for more info on the project
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-users/attachments/20160610/f19364cf/attachment.htm>


More information about the Freeipa-users mailing list