User name in remote SNMPv3 scripting

Started by Rainer Kraft

Rainer Kraft

User name in remote SNMPv3 scripting   23 December 2021, 02:34

I have a problem with remote SNMPv3 scripting.

I can set
Query.V3Security	SNMPv3 security mode string: NoAuthNoPriv, AuthNoPriv or AuthPriv.
Query.V3AuthMode	SNMPv3 authentication algorithm string: MD5 or SHA1.
Query.V3PrivMode	SNMPv3 privacy algorithm string: DES, 3DES or AES.
Query.V3AuthPass	SVMPv3 authentication password string.
Query.V3PrivPass	SNMPv3 privacy password string.
but the user is missing.

Is there a list of all object classes?
SoftPerfect Support forum - Andrew avatar image

Re: User name in remote SNMPv3 scripting   23 December 2021, 12:51

Somehow the user name property was indeed missing. We have just added it into the application and the docs.

Please download the latest build and you should be able to specify a user name like this:
'Create SNMP object and set target host
set objSnmp = Internal.CreateObject("snmp")
objSnmp.Host = "x.x.x.x"

'Use version 3 and get sysDescr
objSnmp.Query.Version = 3
objSnmp.Query.V3AuthMode = "md5"
objSnmp.Query.V3PrivMode = "des"
objSnmp.Query.V3Security = "authpriv"
objSnmp.Query.V3UserName = "snmpv3user"
objSnmp.Query.V3AuthPass = "snmpv3pass"
objSnmp.Query.V3PrivPass = "snmpv3pass"
objSnmp.Query.SetOID("1.3.6.1.2.1.1.1.0")
If objSnmp.SendRequest then
	'Success
	Output.Write objSnmp.Reply.Items(0).Value
End If
SoftPerfect support forum

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

  ******   **    **   ******   ********  **     ** 
 **    **   **  **   **    **  **        **     ** 
 **          ****    **        **        **     ** 
 **           **     **        ******    ********* 
 **           **     **        **        **     ** 
 **    **     **     **    **  **        **     ** 
  ******      **      ******   ********  **     ** 

Message: