Fatal error: USM authentication failure

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
eliassal
Cacti User
Posts: 51
Joined: Thu Jan 13, 2022 12:13 pm

Fatal error: USM authentication failure

Post by eliassal »

Hi, I am trying to use SNMPV3 in cacti to access a router. Issuing from cacti box


snmpget -v3 -l authNoPriv -u salam -a SHA -A "mypassword" 192.168.10.1 sysName.0
I get a response
SNMPv2-MIB::sysName.0 = STRING: DrayTek

However, entering the same info in cacti, I get "System SNMP error".

2022-02-25 19:27:27 - CMDPHP PHP ERROR WARNING Backtrace: (/host.php[139]:api_device_ping_device(), /lib/api_device.php[1119]:cacti_snmp_session_get(), /lib/snmp.php[492]:SNMP->get(), CactiErrorHandler())
2022-02-25 19:27:27 - ERROR PHP WARNING: SNMP::get(): Fatal error: USM authentication failure (incorrect password or key) in file: /usr/share/cacti/lib/snmp.php on line: 492
2022-02-25 19:27:04 - CMDPHP PHP ERROR WARNING Backtrace: (/host.php[139]:api_device_ping_device(), /lib/api_device.php[1119]:cacti_snmp_session_get(), /lib/snmp.php[492]:SNMP->get(), CactiErrorHandler())
2022-02-25 19:27:04 - ERROR PHP WARNING: SNMP::get(): Fatal error: USM authentication failure (incorrect password or key) in file: /usr/share/cacti/lib/snmp.php on line: 492
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: Fatal error: USM authentication failure

Post by Rno »

Did you put your password with the quote also in Cacti ?
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
eliassal
Cacti User
Posts: 51
Joined: Thu Jan 13, 2022 12:13 pm

Re: Fatal error: USM authentication failure

Post by eliassal »

Yes sir
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: Fatal error: USM authentication failure

Post by Rno »

Hmm, I wondering if that's not the problem.
Depending on how the code is written, there maybe a false interpretation of that.
So cacti will use this double quote to close a commandeline, instead of escaping correctly.

I'm using SNMP V3 on all of my device (over 1000) and I have no trouble at all.
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
eliassal
Cacti User
Posts: 51
Joined: Thu Jan 13, 2022 12:13 pm

Re: Fatal error: USM authentication failure

Post by eliassal »

Rno, not sure if your response solves my problem :-)
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: Fatal error: USM authentication failure

Post by Rno »

Hmm
did you try "mypassword" without the quote inside cacti ?
That's the point of my remark
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
eliassal
Cacti User
Posts: 51
Joined: Thu Jan 13, 2022 12:13 pm

Re: Fatal error: USM authentication failure

Post by eliassal »

i never used quotes inside cacti
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests