> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Scott Baker > Sent: Thursday, August 10, 2006 4:53 PM > To: [email protected] > Subject: [Nagios-users] Nagios Plugins using Net::SSH::Perl > > I wrote a script that uses Net::SSH::Perl to login to our > router and check some stats. When I run it as root the script > works perfectly, if I run it as the nagios user it runs fine. > When nagios runs it I get an error that /root/.ssh isn't > writable which as the nagios user it's not. For some reason > running Net::SSH:Perl scripts under the nagios user > environment confuses the script into thinking it's running as root. > > Anyone else have this problem? Is there a known work around?
Sounds like the environment is not being set correctly in your script. This is a wild guess, but I wouldn't be surprised if the HOME variable is being carried over from the user who started Nagios (which is most likely root). ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Nagios-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
