<div dir="ltr">Augh. Sorry for the lame-ass question. Forget what I said. Anyway:<div><br></div><div>So, two Solaris 11.2 systems. On one of them I want to run this in a cron job:</div><div>zfs send -RI ${lastsnap} rpool/zones/${zone}@${currsnap} | ssh ${desthost} &quot;zfs recv -o canmount=off -o compression=on -dFuv rpool&quot;<br></div><div>or more generically</div><div>&lt;command I run as root&gt; | ssh &lt;dest-host&gt; &quot;command I need to run as root&quot;</div><div><br></div><div>I can set up the SSH keys so this works without passwords, but I only understand how to make that work when &#39;root&#39; is an account and not a &quot;role&quot;. So I guess I should look into how to run commands with a specific user account which can run the zfs command and set up the SSH keys so it works without requiring a password.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 10:43 PM, Trevor Cordes <span dir="ltr">&lt;<a href="mailto:trevor@tecnopolis.ca" target="_blank">trevor@tecnopolis.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2015-03-05 Kevin McGregor wrote:<br>
&gt; I&#39;m using Solaris 11.2. I can do this:<br>
&gt;<br>
&gt; logon with an unprivileged account which is allowed to take on the<br>
&gt; &#39;root&#39; role<br>
&gt; su<br>
&gt; type password<br>
&gt; run privileged command<br>
&gt; end the su<br>
&gt;<br>
&gt; This works fine. The privileged command I want to run, though, is to<br>
&gt; SSH to another system with the same account and run the command<br>
&gt; *there* as the remotely privileged account/role, all from a script<br>
&gt; and without (obviously) having to type a password anywhere.<br>
<br>
</span>But your manual process outlined has you typing the password (for su).<br>
If you can&#39;t have it be passwordless manually, how can you make it<br>
passwordless when scripted?  Give us a manual step-by-step process<br>
first that is passwordless, then we&#39;ll worry about scripting it.  :-)<br>
<br>
Why is ssh privileged on the middle system?  Can&#39;t just any user ssh to<br>
the final box?<br>
<span class=""><br>
&gt; I&#39;ve figured out how to do all this IF root is *not* a role and is a<br>
&gt; regular account. How do I do it while leaving root as a role?<br>
<br>
</span>Sorry, I can&#39;t help with roles, I don&#39;t use Solaris.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Roundtable mailing list<br>
<a href="mailto:Roundtable@muug.mb.ca">Roundtable@muug.mb.ca</a><br>
<a href="http://www.muug.mb.ca/mailman/listinfo/roundtable" target="_blank">http://www.muug.mb.ca/mailman/listinfo/roundtable</a><br>
</div></div></blockquote></div><br></div>