Extend - problems with ownerships/run-as

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 -...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-26-2008
Hamish Whittal
 
Posts: n/a
Default Extend - problems with ownerships/run-as

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

Reply With Quote
  #2 (permalink)  
Old 06-26-2008
Thomas Anders
 
Posts: n/a
Default Re: Extend - problems with ownerships/run-as

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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0