打开SNMP的默认配置文件:/etc/snmp/snmp.conf,更改如下配置:
1. 查找以下代码:
# sec.name source community
com2sec notConfigUser default public
将"community"字段改为你要设置的密码.比如"public".
将"default"改为你想哪台机器可以看到你的snmp信息,如192.168.1.210.
2. 查找以下代码:
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
#access notConfigGroup "" any noauth exact systemview none none
access notConfigGroup "" any noauth exact all none none
将"read"字段改为all.
3. 查找以下代码:
## incl/excl subtree mask
#view all included .1 80
将该行前面的"#"去掉.
保存关闭.
4. service snmpd restart
时间: 2024-12-28 15:45:32