SNMP 不支持的安全级别

标签 snmp snmpd

我正在尝试配置我的 snmp 守护程序,但我似乎遇到了一些困难。每当我尝试运行以下命令时:

snmpget -u bootstrap -l authPriv -a MD5 -x DES -A temp_password -X temp_password remote_host 1.3.6.1.2.1.1.1.0

我收到一条错误信息:

snmpget: Unsupported security level

我一直在关注本教程:https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-an-snmp-daemon-and-client-on-ubuntu-14-04 .我读了一些书,发现我在创建用户方面失败了。我把我用过的代码放在下面:

###############################################################################                                              
#                                                                                                                            
#  SNMPv3 AUTHENTICATION                                                                                                     
#                                                                                                                            
#  Note that these particular settings don't actually belong here.                                                           
#  They should be copied to the file /var/lib/snmp/snmpd.conf                                                                
#     and the passwords changed, before being uncommented in that file *only*.                                               
#  Then restart the agent                                                                                                    

#  createUser authOnlyUser  MD5 "remember to change this password"                                                           
#  createUser authPrivUser  SHA "remember to change this one too"  DES                                                       
#  createUser internalUser  MD5 "this is only ever used internally, but still change the password"                           

#  If you also change the usernames (which might be sensible),                                                               
#  then remember to update the other occurances in this example config file to match. 
###############################################################################                                              
#                                                                                                                            
#  ACCESS CONTROL                                                                                                            
#                                                                                                                            

                                                 #  system + hrSystem groups only                                            
view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1

                                                 #  Full access from the local host                                          
 rocommunity public  localhost
# rocommunity public                                                                                                         
                                                 #  Default access to basic system info                                      
 rocommunity public  default    -V systemonly
                                                 #  rocommunity6 is for IPv6                                                 
 rocommunity6 public  default   -V systemonly

                                                 #  Full access from an example network                                      
                                                 #     Adjust this network address to match your local                       
                                                 #     settings, change the community string,                                
                                                 #     and check the 'agentAddress' setting above                            
#rocommunity secret  10.0.0.0/16                                                                                             

                                                 #  Full read-only access for SNMPv3                                         
 rouser   authOnlyUser
                                                 #  Full write access for encrypted requests                                 
                                                 #     Remember to activate the 'createUser' lines above                     
# create temporary user                                                                                                      
createUser bootstrap MD5 "temp_password" DES

# set up level of acccess that user will have. allow for read write access                                                   
rwuser bootstrap priv
rwuser demo priv
#rwuser   authPrivUser   priv  

我相信我已经正确地创建了用户并通过 rwuser 命令提供了正确的授权。任何进一步调试我的代码的帮助将不胜感激。

最佳答案

我想是因为这条线:

rwuser bootstrap priv

应该是这样的:

rwuser bootstrap authPriv

如果你给用户什么“安全级别”,他只能用那个“安全级别”来认证

关于SNMP 不支持的安全级别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35664627/

相关文章:

java - MBean 的 SNMP 监控(snmp-adaptor.sar 中的 attributes.xml)(JBoss)

networking - 服务 snmpd 重启问题

php - 将 SNMP 陷阱数据包传递给 Ubuntu 上的 php 守护进程

c# - SNMP GETBULK 和 GET 操作有什么区别

c - 像 snmpget 这样的 c 应用程序采用什么参数?

c# - 线程监控 Queue<Actions>

sockets - 如何设置snmp agentX子代理的端口?

c - SNMP代理: Could mib2c generate code for InetAddress or String type (ie something not an integer type)

linux - 尽管使用了正确的工具链文件,但为什么 CMake 在交叉编译 Net-SNMP 代理时明显引用主机系统文件?

python - 通过 pip [Python] 安装 easysnmp 时出错