System information

Troubleshooting Security Implementations 24-483
Password-Recovery Procedure: Platforms Running Current Cisco IOS Releases
The following example sets the password letmein on virtual terminal line 4:
line vty 4
password letmein
login
Syntax:
To specify a password on a line, use the password line configuration command:
password password
Syntax Description:
password—Character string that specifies the line password. The first character cannot
be a number. The string can contain any alphanumeric characters, including spaces,
up to 80 characters. You cannot specify password in the format
number-space-anything. The space after the number causes problems. For example,
hello 21 is a legal password, but 21 hello is not. The password checking is case
sensitive. For example, the password Secret is different from the password secret.
When an exec process is started on a line with password protection, the exec prompts
for the password. If the user enters the correct password, the exec prints its normal
privileged prompt. The user can try three times to enter a password before the exec
exits and returns the terminal to the idle state.
Example:
The following example removes the password from virtual terminal lines 1 to 4:
line vty 1 4
no password
Step 14 If you lost the enable password, locate the enable-password global configuration
command entry in the configuration and record the password.
If you lost the login password, find the configuration entries for the console line and
record the password indicated by the password line configuration command.
Step 15 Use the copy running-config startup-config or write memory privileged exec
command to write the configuration into NVRAM.
Note Issuing the copy running-config startup-config or write memory command at this point on
a Cisco 2500, Cisco 3000, or Cisco 4000 will overwrite the configuration. Make certain you have a
backup of your configuration file.
Step 16 The router is now fully functional, and you can use your recovered or reconfigured
passwords as usual.
Note Restore the software configuration register to its original value as soon as possible. If it is not
returned to the value you noted in Step 3, the router will always ignore the contents of NVRAM and
enter the Setup routine upon booting. Continue with Step 17 to return the software configuration
register to its original value.
Step 17 In privileged exec mode, enter router configuration mode using the configure terminal
privileged exec command.