This is a discussion on Extend - problems with ownerships/run-as within the SNMP Users forums, part of the Networking and Network Related category; Hi guys, I wish to extend the agent functionality using a script: If I run the command as follows: su -...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi guys,
I wish to extend the agent functionality using a script: If I run the command as follows: su -c "/opt/MegaRAID/MegaCli/MegaCli -LDInfo -L0 -a0" root Then I get a result, but running it as: su -c "/opt/MegaRAID/MegaCli/MegaCli -LDInfo -L0 -a0" snmp Then nothing is returned. snmpd runs as the user snmp, but the MegaCli seems only to want to return output when it's run as root, not as snmp. As a result, my script returns an empty string and not what I'm after. How does one get around this type of problem. I would not like to run snmpd as root for obvious security reasons. Thanks H ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users |
|
|||
|
Hamish Whittal wrote:
> snmpd runs as the user snmp, but the MegaCli seems only to want to > return output when it's run as root, not as snmp. As a result, my script > returns an empty string and not what I'm after. > > How does one get around this type of problem. I would not like to run > snmpd as root for obvious security reasons. You could use "sudo ... MegaCli ..." in your script and configure your sudoers file appropriately. +Thomas ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users |