<div dir="ltr"><div><br></div><div>The only user-id change needed is for the one server to server connection.  Everything else runs as the normal user.  I want to keep it as simple as possible for the users as I&#39;m really pushing the boundaries of their technical ability by having them use putty in the first place let alone asking them to run a command line.  The main perl script does all the logic checking, etc already, but I don&#39;t want someone else finding and running the setuid script and doing something malicious just because they can.</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 22, 2014 at 7:20 PM, JD <span dir="ltr">&lt;<a href="mailto:jdp@algoloma.com" target="_blank">jdp@algoloma.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="">On 05/22/2014 07:37 PM, Robert L. Harris wrote:<br>
&gt; The reason for the &quot;system&quot; is just to see what value I&#39;m getting out.<br>
&gt;<br>
&gt; I have a perl script doing a bunch of processing which will be run by a couple<br>
&gt; different users.  One aspect of the perl script is to connect to another machine<br>
&gt; and run a command as a specific user.  Instead of having others know the passwd,<br>
&gt; etc.  I have a hostkey set up from my server as a non-privledged user to another<br>
&gt; system.  I want to have the C program setuid to the non-privledged user, ssh to<br>
&gt; the second server and run 1 command with the only variable being XXXXX.  More<br>
&gt; convoluted than I want but the safest method I can come up with to get just the<br>
&gt; output I need from the second server.<br>
<br>
</div>This sounds like a job for sudo to me.  I must be reading it wrong.<br>
sudo isn&#39;t just for root/admin needs.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>:wq!<br>---------------------------------------------------------------------------<br>Robert L. Harris<br><br>DISCLAIMER:<br>      These are MY OPINIONS             With Dreams To Be A King,<br>

       ALONE.  I speak for                      First One Should Be A Man<br>       no-one else.                                     - Manowar
</div>