FWIW, I'm still getting STDIN/tty errors to $err, but it is running interactively and asking for my password. It appears to be a limitation of su, requiring local tty control(?). There are others here who would be better qualified to answer that one. I have no problem running non-su commands, though. Good Luck!

 

I think the best solution for mikfire with this problem would be to investigate the use of sudo - This command allows administrators to grant permissions to users to execute priviledged commands without having to su to root. The advantage with this command offers in this scenario however is that, when configured as such, it allows priviledged commands to be executed by users without prompting for a password.

 

perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'


In reply to Re: Re: Net::SSH::Perl and su by rob_au
in thread Net::SSH::Perl and su by mikfire

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.