snmpv3用户
Syntax
snmpv3用户 [auth auth-pass {plaintext | ciphertext} [priv priv-pass {plaintext | ciphertext} ] ] no snmpv3 user [auth auth-pass [priv priv-pass ] ]
Description
Creates an SNMPv3 user and adds it to an SNMPv3 context.
Theno
form of this command removes the specified SNMPv3 user.Command context
config
Parameters
-
-
Specifies the SNMPv3 username. Range 1 - 32 printable ASCII characters, excluding space and question mark.
-
auth
-
Specifies the authentication protocol used to validate user logins. Available options are:
md5
orsha
. -
auth-pass {plaintext | ciphertext}
-
Specifies the SNMPv3 user password. Range for
plaintext
is 8 - 32 printable ASCII characters, excluding space and question mark.Range for
ciphertext
is 1 - 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:
aes
ordes
. -
priv-pass {plaintext | ciphertext}
-
Specifies the SNMPv3 user privacy passphrase. Range for
plaintext
is 8 - 32 printable ASCII characters, excluding space and question mark.Range for
ciphertext
is 1 - 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-config
command to display switch configuration settings. The snmpv3 user command uses theciphertext
option 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 TL.10.00.0003-8017-gdeb0606~dirty ! ! ! 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 the snmpv3 user command that was displayed byshow running-config
on 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=