User Account Management Commands

Use these M4500 CLI commands to create and unlock user accounts and set password aging, history, lockout, length, and strength rules.

This section describes the commands you use to configure port-based network access control (IEEE 802.1X). Port-based network access control allows you to permit access to network services only and to permit access to devices that are authorized and authenticated.

show users

This command displays the configured user names and their settings.

Default None
Format show users
Mode Privileged Exec

Display Message

Parameter Definition
User Name The name the user will use to login using the serial port, Telnet. A new user may be added to the switch by entering a name in a blank entry. The user name may be up to 64 characters, and is case sensitive. Two users are included as the factory default, admin, and guest.
User Access Mode Shows whether the operator is able to change parameters on the switch (Privilege-15) or is only able to view them (Privilege-1). As a factory default, admin has Privilege-15 access and guest has Privilege-1 access. There can only be one Privilege-15 user and up to five Privilege-1 users.

Example: The following shows examples of the CLI display output for the commands.

CODE
(M4500-32C) (Config)#show users
                          User
User Name                 Access Mode
------------------------  --------------------
admin                     Privilege-15
guest                     Privilege-1

show users long

This command displays full names of users.

Default None
Format Show users long

Example:

CODE
(M4500-48XF8C) # show users long
User Name
------------
admin
guest
(M4500-48XF8C) #

show users accounts

The user can go to the CLI Privilege Exec to get all of user information, use the show users accounts Privilege command.

Default None
Format show users accounts [detail]
Mode Privileged Exec

Display Message

Parameter Definition
User Name The local user account’s user name.
Privilege The user’s privilege level. The range of privilege level is 1 and 15. Access mode for privilege level 15 is read/write, the others is read-only.
Password Aging Indicates number of days, since the password was configured, until the password expires.
Password Expiration Date The current password expiration date in date format.
Lockout Indicates whether the user account is locked out (true or false).

Example: The following shows examples of the CLI display output for the commands.

CODE
(M4500-32C) (Config)#show users accounts
UserName    Privilege   Password   Password      Lockout
                        Aging      Expiry date
---------   ---------   --------   -----------   -------
admin       15                                   False
guest       1                                    False

(M4500-32C) (Config)#show users accounts detail

UserName....................................... admin
Privilege...................................... 15
Password Aging................................. ---
Password Expiry................................ ---
Lockout........................................ False
Password Force Change...........................False
Override Complexity Check...................... Disable
Password Strength.............................. ---

UserName....................................... guest
Privilege...................................... 1
Password Aging................................. ---
Password Expiry................................ ---
Lockout........................................ False
Override Complexity Check...................... Disable
Password Strength.............................. ---

show passwords configuration

Use this command to display the configured password management settings.

Default None
Format show passwords configuration
Mode Privileged Exec

Display Message

Parameter Definition
Minimum Password Length Minimum number of characters required when changing passwords.
Password Aging Length in days that a password is valid.
Password History Number of passwords to store for reuse prevention.
Lockout Attempts Number of failed password login attempts before lockout.
Password Strength Check The user to configure passwords that comply with the strong password configuration.
Minimum Password Uppercase Letters Minimum number of uppercase characters required when changing passwords.
Minimum Password Lowercase Letters Minimum number of lowercase characters required when changing passwords.
Minimum Password Numeric Characters Minimum number of numeric characters required when changing passwords.
Minimum Password Special Characters Minimum number of special characters required when changing passwords.
Maximum Password Repeated Characters Maximum number of characters cannot repeated when changing passwords.
Maximum Password Consecutive Characters Maximum number of characters cannot consecutive when changing passwords.
Minimum Password Character Classes Valid range for user passwords.
Password Exclude Keywords The password to be configured should not contain the keyword mentioned in this field.

Example: The following shows examples of the CLI display output for the commands.

CODE
(M4500-32C) (Config)#show passwords configuration
Passwords Configuration
---------------------------------
Minimum Password Length........................ 8
Password Aging (days).......................... 0
Password History............................... 0
Lockout Attempts............................... 0
Password Strength Check........................ Enable
Minimum Password Uppercase Letters............. 0
Minimum Password Lowercase Letters............. 0
Minimum Password Numeric Characters............ 1
Minimum Password Special Characters............ 1
Maximum Password Repeated Characters........... 0
Maximum Password Consecutive Characters........ 0
Minimum Password Character Classes............. 3
Password Exclude Keywords...................... <none>

show passwords result

Use this command to display the last password set result information.

Default None
Format show passwords result
Mode Privileged Exec

Display Message

Parameter Definition
Last User Whose Password Is Set The local user account’s user name.
Password Strength Check The user’s privilege level. The range of privilege level is 1 and 15. Access mode for privilege level 15 is read/write, the others is read-only.
Last Password Set Result Indicates number of days, since the password was configured, until the password expires.

Example: The following shows examples of the CLI display output for the commands.

CODE
(M4500-32C) (Config)#show passwords result

Last User whose password is set .................. guest
Password strength check .......................... Disable
Last Password Set Result:
========================
Password Successfully Configured for User 'guest'.

username

This command adds a new user (account) if space permits. The default privilege level is 1. The account <username> can be up to 64 characters in length. The name may be comprised of alphanumeric characters as well as the dash (‘-’) and underscore (‘_’). The <username> is case-sensitive. Six user names can be defined.

This command changes the password of an existing operator. The user password should not be more than 64 characters in length. If a user is authorized for authentication or encryption is enabled, the password must be 64 alphanumeric characters in length. The username and password are case-sensitive. When a password is changed, a prompt asks for the operator’s former password. If none, press enter.

Note: The admin user account cannot be deleted. The special characters allowed in the password include # $ % & ‘ ( ) * + , - / ; < = > @ [ \ ] ^ _ ` { | } ~
Default None
Format username <username> { level <level> | passwd [7 <password>]}
Mode Global Config
Parameter Definition
<username> A new user name (Range: up to 64 characters).
<level> The user level. Level 0 can be assigned by a level 15 user to another user to suspend that user’s access. Range 0-15. Enter access level 1 for Read Access or 15 for Read/Write Access. If not specified where it is optional, the privilege level is 1.
passwd Type the passwd keyword to set the password in plain text. The text that you type is displayed in asterisk characters. The maximum length of a plain-text password is 64 characters.
7 <password> Type the 7 keyword to set an encrypted password, which must be exactly 128 hexadecimal characters in length.

no username

This command removes a user name created before.

Format no username <username>
Mode Global Config

username <username> unlock

The user can go to the CLI Global Configuration Mode to unlock a locked user account, use the username <name> unlock global configuration command.

Default None
Format username <username> unlock
Mode Global Config
Parameter Definition
<username> A username.

passwords aging

If the passwords aging is set, the local user will be prompted to change it before logging in again when the local user’s password expires.

Default 0, no aging
Format passwords aging <1-365>
Mode Global Config
Parameter Definition
<1-365> Number of days until password expires.

no passwords aging

Use the no passwords aging return to default value 0.

Format no passwords aging
Mode Global Config

passwords history

Use this command to set the number of previous passwords that shall be stored for each user account. If password history is set, the local user will not be able to reuse any password stored in password history when the local user changes his or her password.

Default 0, no aging
Format passwords aging history <0-10>
Mode Global Config
Parameter Definition
<0-10> Number of passwords to be used in password history check.

no passwords history

Use the no passwords history return to default value 0.

Format no passwords history
Mode Global Config

passwords lock-out

Use this command to strengthen the security of the switch by locking user accounts that have failed login due to wrong passwords. When a lockout count is configured, a user that is logged in must enter the correct password within that count. Otherwise the user will be locked out from further switch access. Only a user with read/write access can re-activate a locked user account. The user can go to the CLI Global Configuration Mode to set the password lock-out count.

Default 0
Format passwords lock-out <1-5>
Mode Global Config
Parameter Definition
<1-5> The number of password failures before account lock.
Note: If the admin user fails to connect to the switch using SSH port 1234 or telnet port 1223, the admin user is locked out. However, the admin user can still log in to the switch using a console connection or using SSH port 22 (Linux system login).

no passwords lock-out

Use the no passwords lock-out to return to default value 0.

Format no passwords lock-out
Mode Global Config

passwords min-length

The user can go to the CLI Global Configuration Mode to set the minimum password length.

Default 8
Format passwords min-length <8-64>
Mode Global Config
Parameter Definition
<8-64> The length of password.

no passwords min-length

Use the no passwords min-length return to default value 0.

Format no passwords min-length
Mode Global Config

passwords strength-check

The user can go to the CLI Global Configuration Mode to set the password strength policy enforcement, use the passwords strength-check Global configuration command.

Default Disable
Format passwords strength-check
Mode Global Config

no passwords strength-check

Use the no passwords strength-check return to default disable.

Format no passwords strength-check
Mode Global Config

passwords strength maximum

The user can go to the CLI Global Configuration Mode to set the password strength.

Default 0
Format passwords strength maximum {consecutive-characters | repeated-characters} [<0-15>]
Mode Global Config

no passwords strength maximum

Use the no passwords strength maximum {consecutive-characters | repeated-characters} return to default value 0.

Format no passwords strength maximum {consecutive-characters | repeated-characters}
Mode Global Config

passwords strength minimum

The user can go to the CLI Global Configuration Mode to set the password strength.

Default

uppercase-letters 2

lowercase-letters 2

Format passwords strength minimum {character-classes <0-4> | lowercase-letters <0-16> | numeric-characters <0-16> | special-characters <0-16> | uppercase-letters <0-16>}

numeric-characters 2 special-characters 2 character-classes 4

Mode Global Config

no passwords strength minimum

Use the no passwords strength minimum {character-classes | lowercase-letters | numeric-characters | special-characters | uppercase-letters} return to default value 2.

Format no passwords strength minimum {character-classes | lowercase-letters | numeric-characters | special-characters | uppercase-letters}
Mode Global Config

passwords strength exclude-keyword

The user can go to the CLI Global Configuration Mode to set the password strength, use the passwords strength exclude-keyword <keyword> Global configuration command.

Default None
Format passwords strength exclude-keyword <keyword>
Mode Global Config

no passwords strength exclude-keyword

Use the no passwords strength exclude-keyword <keyword> return to default none.

Format no passwords strength exclude-keyword <keyword>
Mode Global Config

show users login-history

This command displays the history of user login.

Default None
Format show users login-history

Example:

CODE
(M4500-48XF8C) #show users login-history
Login Time             Username              Protocol      Location
---------------------  --------------------  ------------  ---------------
May 06 2020 03:33:21   admin                 Serial
May 06 2020 03:24:42   admin                 Serial
May 06 2020 02:46:16   admin                 Serial
May 06 2020 02:35:13   admin                 Serial
May 06 2020 02:14:59   admin                 Serial
May 06 2020 02:04:07   admin                 Serial
May 06 2020 01:56:32   admin                 Serial
May 06 2020 01:08:01   admin                 Serial
May 06 2020 00:46:43   admin                 Serial
May 06 2020 00:34:54   admin                 Serial
May 06 2020 00:10:26   admin                 Serial
May 05 2020 07:23:01   admin                 Serial
May 05 2020 07:04:51   admin                 Serial
May 05 2020 06:21:46   admin                 Serial
May 05 2020 06:21:32   admin                 Serial
(M4500-48XF8C) #

user password override-complexity-check

This command is used to enable override-complexity-check of password.

Default Disabled
Format username <username> level<level> override-complexity-check password
Mode Global Config

user role

This command is used to assign an RBAC role to a user.

Default None
Format username <username> role <name>
Mode Global Config