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

2016-06-10 Thread Mitra Dehghan
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" wrote: > Hi Mitra, >I

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

2016-06-06 Thread Brennan, Paul J
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,