2.2. Configuring User Management
Overview
Function Introduction
User management increases the security of the system by keeping the unauthorized users from guessing the password. The user is limited to a specific number of attempts to successfully log in to the switch. Please refer to login-security
command for additional information.
There are three load modes in the switch.
In “no login” mode, anyone can load the switch without authentication.
In “login” mode, there is only one default user.
In “login local” mode, if you want to load the switch you need to have a user account. Local user authentication uses local user accounts and passwords that you create to validate the login attempts of local users. Each switch has a maximum of 32 local user accounts. Before you can enable local user authentication, you must define at least one local user account. You can set up local user accounts by creating a unique username and password combination for each local user. Each username must be fewer than 32 characters. You can configure each local user account with a privilege level; the valid privilege levels are 1 or 4. Once a local user is logged in, only the commands those are available for that privilege level can be displayed.
There is only one user can enter the configure mode at the same time.
Principle Description
N/A
Configuration
Configuring the user management in login local mode
step 1 Enter the configure mode
Switch# configure terminal
step 2 et username and password
Switch(config)# username testname privilege 4 password 123abc
step 3 Enter the configure mode and set user management mode
Switch(config)# line vty 0 7
Switch(config-line)# login local
Switch(config-line)# exit
step 4 Exit the configure mode
Switch(config)# exit
step 5 Validation
After the above setting, login the switch will need a username and password, and user can login with the username and password created before. This is a sample output of the login prompt.
Username
After the input the username, a password is required.
Username: testname
Password:
Authentication succeed:
Password:
Switch#
Configuring the user management in login mode
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the configure mode and set password
Switch(config)# line vty 0 7
Switch(config-line)# line-password abc
Switch(config-line)# login
step 3 Exit the configure mode
Switch(config)# exit
step 4 Validation
After the above setting, login the switch will need the line password, and user can login with the password created before. This is a sample output of the login prompt.
Password:
Configuring Password recovery procedure
If the password is forgotten unfortunately, it can be recovered by following steps.
Step 1 Power on the system. Boot loader will start to run. The follow information will be printed on Console.
<system info>
Autoboot in 5 seconds. Double-press ESC to abort.
Step 2 Press ESC key twice to to stop autoboot.
Bootrom#
Step 3 Under boot loader interface, use the following instructions.
Bootrom# boot_flash_nopass
Bootrom# Do you want to revert to the default config file ? [Y\N\E]:
Please remember your username and password.
Recovering the password may lead configuration lost or service interrupted; we strongly recommend that user should remember the username and password.
Application cases
N/A