http://www.perlmonks.org?node_id=150478


in reply to Re: Re: Net::SSH::Perl and su
in thread Net::SSH::Perl and su

Alas, if only it were that easy. I can't use sudo for two main reason. First, the command I want to run is going to change. Second, due to some serious security concerns, there is no way I could convince them to allow me to use the NOPASSWD option in sudo.

mikfire

Replies are listed 'Best First'.
Re: Re: Re: Re: Net::SSH::Perl and su
by rob_au (Abbot) on Mar 09, 2002 at 04:01 UTC
    ... due to some serious security concerns, there is no way I could convince them to allow me to use the NOPASSWD option in sudo.

     

    To my mind, it is of greater concern that fact that you are looking to store the root and a user password into a remote script. All one would have to to is view the source of your script and they would have both a login and the root account on the remote system - A restricted shell with sudo access rights to a small selection of administrative commands would be a better choice to my mind by far.

     

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