SolarisDisableSNMP

== How to disable SNMP under Solaris 10 ==

Disabling SNMP under Solaris 10 is a bit more complicated than disabling a normal service, the main reason being that it is not managed through the normal {{{svcadm}}} utility of Solaris 10.

Solaris 10 ships with {{{net-snmp}}} by default, which is good, except you just can type {{{svcadm -v disable ...snmp...}}} and be on your way. Here is how to do it simply and rapidly:

==== 1. Use the {{{/etc/init.d/}}} scripts to stop Net-SNMP ====

There are three scripts that control {{{net-snmp}}} under Solaris, they are the following:

{{{ -rwxr--r-- 1 root sys 373 Dec 22 2006 init.dmi* -rwxr-xr-x 5 root sys 2.2K Jan 8 2005 init.sma* -rwxr--r-- 1 root sys 382 Dec 22 2006 init.snmpdx* }}}

Therefore, as {{{root}}}, you should enter the following commands to stop {{{net-snmp}}}:

{{{ # /etc/init.d/init.dmi stop # /etc/init.d/init.sma stop # /etc/init.d/init.snmpdx stop }}}

Once this is done, {{{net-snmp}}} should be stopped on your Solaris 10 machine.

==== 2. Disable the {{{/etc/init.d/}}} scripts. ====

To prevent {{{net-snmp}}} to be restarted at the next reboot, simply render the {{{/etc/init.d/}}} scripts non-executable:

{{{ # chmod a-x /etc/init.d/init.dmi # chmod a-x /etc/init.d/init.sma # chmod a-x /etc/init.d/init.snmpdx }}}

This makes sure the scripts won't be launched when the machine is rebooted.

==== 3. Remove the {{{/etc/rc3.d}}} symbolic links. ====

This step is optional, but highly recommended. It makes the startup of your Solaris server much easier to understand.

To do this:

{{{ # cd /etc/rc3.d # rm S76snmpdx # rm S77dmi # rm S82initsma }}}

And... That's it!

I hope this helps.

Putting SNMP back together after doing this is left as an exercice to the reader... ;-)

== See Also: ==