SNMP Reason: authorizationError (access denied to that object)

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

duwijakarta
Cacti User
Posts: 52
Joined: Thu Apr 18, 2024 10:40 pm

Re: snmpwalk: Unknown user name

Post by duwijakarta »

Rno wrote: Tue Jun 11, 2024 1:42 am No you can keep your settings, my config is an example, and a format that is working.
hello sir,
is this Error in packet, Reason: authorizationError (access denied to that object) something to do with ssh access to the device?
do I need to make the username on snmpv3 match the username to access ssh to the device?
because, until now it still hasn't worked, is there really a problem with the device software?
thanks
User avatar
macan
Cacti Guru User
Posts: 1104
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: SNMP Reason: authorizationError (access denied to that object)

Post by macan »

it has nothing to do with ssh. You need only correct snmp v3 settings
Let the Cacti grow!
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: SNMP Reason: authorizationError (access denied to that object)

Post by Rno »

Snmp user ena ssh user are 2 different user. You can have the same, but for security reason take 2 different.

The problem with the authorization is probably due to this part:
snmp-server view ViewDefault iso included

That give the user the base of the OID where it can parse the device.

Did you try to reproduce my config with your user settings ? (I mean username and encryption level)
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
duwijakarta
Cacti User
Posts: 52
Joined: Thu Apr 18, 2024 10:40 pm

Re: SNMP Reason: authorizationError (access denied to that object)

Post by duwijakarta »

Rno wrote: Tue Jun 18, 2024 2:04 am Snmp user ena ssh user are 2 different user. You can have the same, but for security reason take 2 different.

The problem with the authorization is probably due to this part:
snmp-server view ViewDefault iso included

That give the user the base of the OID where it can parse the device.

Did you try to reproduce my config with your user settings ? (I mean username and encryption level)
not all, I haven't added snmp-server view ViewDefault iso included, should I try adding that command?
duwijakarta
Cacti User
Posts: 52
Joined: Thu Apr 18, 2024 10:40 pm

Re: SNMP Reason: authorizationError (access denied to that object)

Post by duwijakarta »

Rno wrote: Tue Jun 18, 2024 2:04 am Snmp user ena ssh user are 2 different user. You can have the same, but for security reason take 2 different.

The problem with the authorization is probably due to this part:
snmp-server view ViewDefault iso included

That give the user the base of the OID where it can parse the device.

Did you try to reproduce my config with your user settings ? (I mean username and encryption level)
my config

switch#
!
snmp-server group SnmpSwitch v3 priv
snmp-server community switchsnmp RO
snmp-server trap-source Vlanxxx
snmp-server source-interface informs Vlanxxx
snmp-server host xx.xx.xx.xx version 3 priv switchsnmp udp-port 161
snmp-server manager
!


User name: switchsnmp
Engine ID: xxxxxxxxxxxxxxxxx
storage-type: nonvolatile active
Authentication Protocol: MD5
Privacy Protocol: AES128
Group-name: SnmpSwitch

groupname: switchsnmp security model:v1
contextname: <no context specified> storage-type: permanent
readview : v1default writeview: <no writeview specified>
notifyview: <no notifyview specified>
row status: active

groupname: switchsnmp security model:v2c
contextname: <no context specified> storage-type: permanent
readview : v1default writeview: <no writeview specified>
notifyview: <no notifyview specified>
row status: active

groupname: SnmpSwitch security model:v3 priv
contextname: <no context specified> storage-type: nonvolatile
readview : <no readview specified> writeview: <no writeview specified>
notifyview: *tv.FFFFFFFF.FFFFFFFF.FFFFFFFF.F
row status: active

Is there anything that needs to be fixed in the config?
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: SNMP Reason: authorizationError (access denied to that object)

Post by Rno »

Can you post this: show snmp view

And in your SNMP group config:
groupname: SnmpSwitch security model:v3 priv
contextname: <no context specified> storage-type: nonvolatile
readview : <no readview specified> writeview: <no writeview specified>
notifyview: *tv.FFFFFFFF.FFFFFFFF.FFFFFFFF.F
row status: active

The readview and writeview are not configured

Thats whas the reason I said you need this line:
snmp-server view ViewDefault iso included

So your group config should look like that:
snmp-server group SnmpSwitch v3 priv read ViewDefault write ViewDefault
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
duwijakarta
Cacti User
Posts: 52
Joined: Thu Apr 18, 2024 10:40 pm

Re: SNMP Reason: authorizationError (access denied to that object)

Post by duwijakarta »

Rno wrote: Tue Jun 18, 2024 3:59 am Can you post this: show snmp view

And in your SNMP group config:
groupname: SnmpSwitch security model:v3 priv
contextname: <no context specified> storage-type: nonvolatile
readview : <no readview specified> writeview: <no writeview specified>
notifyview: *tv.FFFFFFFF.FFFFFFFF.FFFFFFFF.F
row status: active

The readview and writeview are not configured

Thats whas the reason I said you need this line:
snmp-server view ViewDefault iso included

So your group config should look like that:
snmp-server group SnmpSwitch v3 priv read ViewDefault write ViewDefault

okay, thanks for the suggestion, so I only need to add these 2 commands, okay?
snmp-server group SnmpSwitch v3 priv read ViewDefault write ViewDefault
snmp-server view ViewDefault iso included

or I can just add like this?
snmp-server group SnmpSwitch v3 priv read ViewDefault
snmp-server view ViewDefault iso included
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: SNMP Reason: authorizationError (access denied to that object)

Post by Rno »

Yes the second one should be just fine.
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
duwijakarta
Cacti User
Posts: 52
Joined: Thu Apr 18, 2024 10:40 pm

Re: SNMP Reason: authorizationError (access denied to that object)

Post by duwijakarta »

Rno wrote: Wed Jun 19, 2024 12:26 pm Yes the second one should be just fine.
Thank you for the advice, snmpv3 has now worked :D
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests