snmpv3用户

Syntax

snmpv3用户[authauth-pass {plaintext | ciphertext}[privpriv-pass {plaintext | ciphertext}] ] no snmpv3 user[authauth-pass[privpriv-pass] ]

Description

Creates an SNMPv3 user and adds it to an SNMPv3 context. Thenoform of this command removes the specified SNMPv3 user.

For more details on the user enabled status, seesnmpv3 security-level.

Command context

config

Parameters

Specifies the SNMPv3 username. Range 1 to 32 printable ASCII characters, excluding space and question mark (?).

auth

Specifies the authentication protocol used to validate user logins. Available options are:md5orsha.

auth-pass {plaintext | ciphertext}

Specifies the SNMPv3 user password. Range forplaintextis 8 to32 printable ASCII characters, excluding space and question mark (?).

Range forciphertextis 1 to 120 printable ASCII characters. This option is only used when copying user configuration settings between switches. It enables you to duplicate a user's configuration on another switch without having to know their password.

priv

Specifies the SNMPv3 security protocol (encryption method). Available options are:aesordes.

priv-pass {plaintext | ciphertext}

Specifies the SNMPv3 user privacy passphrase. Range forplaintextis 8 to 32 printable ASCII characters, excluding space and question mark (?).

Range forciphertextis 1 to 120 printable ASCII characters. This option is only used when copying user configuration settings between switches. It enables you to duplicate a user's configuration on another switch without having to know their password.

Authority

Administrators or local user group members with execution rights for this command.

Examples

Defining an SNMPv3 user namedAdminusingshaauthentication with the plaintext passwordmypasswordand usingdessecurity with the plaintext passwordmyprivpass:

switch(config)#snmpv3用户Admin auth sha auth-pass plaintext mypassword priv des priv-pass plaintext myprivpass

Removing an SNMPv3 user namedAdmin:

switch(config)#没有snmpv3用户管理

Defining an SNMPv3 user namedAdminusingshaauthentication with the plaintext passwordmypasswordand usingdessecurity with the plaintext passwordmyprivpass:

switch(config)#snmpv3用户Admin auth sha auth-pass plaintext mypassword priv des priv-pass plaintext myprivpass

复制一个SNMP user from switch 1 to switch 2.

On switch 1, configure a user calledAdmin, then issue theshow running-configcommand to display switch configuration settings. The snmpv3 user command uses theciphertextoption to protect the users's passwords.

switch1(config)#snmpv3用户Admin auth sha auth-pass plaintext mypassword priv des priv-pass plaintext myprivpassswitch1(config)#exitswitch1#show running-configCurrent configuration: ! !Version ArubaOS-CX XL.10.04.0001AD ! ! ! snmpv3 user Admin auth sha auth-pass ciphertext AQBapZHf2d20GYr/xcGUzYzm0zjNf/4VKHtSqbNImqtfYbJYCgAAALkGFJVcSp3nZ3o= priv des priv-pass ciphertext AQBapb0H2poBQKXPoVsC9L9qzZyfJQnzR7hmTr7LGsOsI7K3CgAAAKP98Rq2jfTrFwQ= ssh server vrf mgmt ! ! ! ! interface mgmt no shutdown ip dhcp vlan 1

On switch 2, execute thesnmpv3用户command that was displayed byshow running-configon switch 1. This creates the user on switch 2 with the same configuration settings.

switch1(config)#snmpv3用户Admin auth sha auth-pass ciphertextAQBapZHf2d20GYr/xcGUzYzm0zjNf/4VKHtSqbNImqtfYbJYCgAAALkGFJVcSp3nZ3o=priv des priv-pass ciphertext AQBapb0H2poBQKXPoVsC9L9qzZyfJQnzR7hmTr7LGsOsI7K3CgAAAKP98Rq2jfTrFwQ=