Advanced SNMP question

ionmanage
ionmanage used Ask the Experts™
on
Experts,

I know that you can reboot a router via snmp, is it possible to send a command via snmp to reboot a workstation?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Consultant
Commented:
NO.

SNMP is used to monitor network-attached devices for conditions that warrant administrative attention, there is no device control command for SNMP.
you need each machine to be configured to allow this.

basically
- create a mib in your snmpd software
- make it read-write
- have a script that checks its value periodically and issues a reboot command

some snmpd servers will let you directly trigger a script directly from within the server. it can even be triggered by reading a MIB instead of writing to it

it is actually trivial in perl's snmpd
this is a redhat doc but is applicable to anything that runs the same soft
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sect-System_Monitoring_Tools-Net-SNMP-Extending.html
Rich RumbleSecurity Samurai
Top Expert 2006
Commented:
For windows it is possible, but not easy. It is better to use a remote command shell via power-shell, WMI or a program like PsShutDown, or even PsExec. You could set a trap for it to execute a command on a remote machine or using a script.

Here are some possible ways to access the WRITE portions of SNMP in windows
http://msdn.microsoft.com/en-us/library/aa393008%28v=vs.85%29.aspx
-rich
you can also do it in windows either with an snmp extension using the builtin snmpd
http://support.microsoft.com/kb/128729/en

or by installing perl's snmpd under windows (which actually used some of the dll's of windows's snmpd last time i checked)

... but if you have a domain, psshutdown is simpler

likewise most unices workstations can be shut down over ssh for example

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial