<p dir="ltr">Dear Paul, <br>
Thanks for your suggestion. It worked.<br>
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. <br>
Thanks a lot. </p>
<div class="gmail_quote">On Jun 6, 2016 8:33 PM, "Brennan, Paul J" <<a href="mailto:Paul.Brennan@itec.suny.edu">Paul.Brennan@itec.suny.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi Mitra,<br>
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 ~<i>srvusr</i>. You may want to try:<br>
<br>
$ sudo -u <i>srvusr</i> -i <i>/path/to/target_cmd<br>
<br>
</i>That should run the command using a login shell for <i>srvusr</i>, instantiating that user's variables.<br>
<br>
Good luck,<br>
Paul Brennan<br>
<br>
(Apologies if this ends up in the wrong thread or something, I just signed up to this list.)<br>
</div>
</div>
<br>--<br>
Manage your subscription for the Freeipa-users mailing list:<br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
Go to <a href="http://freeipa.org" rel="noreferrer" target="_blank">http://freeipa.org</a> for more info on the project<br></blockquote></div>