Linux

來自 Linux 的 AIX 上的 SNMPv3 顯示身份驗證失敗

  • June 7, 2021

我想在 AIX 上使用 snmpv3,客戶端是使用 snmpwalk 命令的 Linux

在 AIX 端,我首先創建密碼的雜湊

pwtokey -p HMAC-SHA -u auth mypass 192.178.0.37

命令返回這一行

Display of 20 byte HMAC-SHA localized authKey:
 18de41acdd2c8f0a1cb24f875g611198ea23e990

然後我編輯 /etc/snmpdv3.conf

cp /etc/snmpdv3.conf /etc/snmpdv3.conf.orig
vim /etc/snmpdv3.conf 

我添加了這些行

USM_USER u1 - HMAC-SHA 18de41acdd2c8f0a1cb24f875g611198ea23e990 - - L -
VACM_GROUP group1 USM u1 -
VACM_VIEW group1View            interfaces         - included -
VACM_VIEW group1View            tcp                   - included -
VACM_VIEW group1View            icmp                  - included -
VACM_VIEW group1View            system             - included -
VACM_VIEW group1View            sysObjectID        - excluded -
VACM_ACCESS  group1 - - AuthNoPriv USM group1View - group1View -
NOTIFY notify1 traptag trap -
TARGET_ADDRESS Target1 UDP 192.178.0.37    traptag trapparms1 - - -
TARGET_PARAMETERS trapparms1 SNMPv3  USM     u1        AuthNoPriv -

我重新啟動所有守護程序

stopsrc -s aixmibd
stopsrc -s hostmibd
stopsrc -s snmpmibd
stopsrc -s snmpd
startsrc -s aixmibd
startsrc -s hostmibd
startsrc -s snmpmibd
startsrc -s snmpd

現在我從 Linux 客戶端執行 smpwalk ..

snmpwalk -v3 -u u1 -a SHA -A "mypass" 192.178.0.37
SNMPv2-SMI::mib-2 = No more variables left in this MIB View (It is past the end of the MIB tree)

我也試過

snmpwalk -v3 -l authNoPriv -u u1 -a SHA -A "mypass" -x DES -X "mypass" 192.178.0.37
snmpwalk -v3 -l authNoPriv -u u1 -a SHA -A "mypass" -x AES -X "mypass" 192.178.0.37

但失敗了

"snmpwalk: Authentication failure (incorrect password, community or key)"

當然通行證是正確的

我想念什麼?

找到解決方案。AIX 上的 SNMPv3 需要 snmp.crypto 並且未安裝在我的系統上

lslpp -cl snmp.crypto
lslpp: Fileset snmp.crypto not installed.

引用自:https://unix.stackexchange.com/questions/653104