Syntax:
To enable password checking at login, use the login line configuration command:
login [local | tacacs]
Syntax Description:
local - (Optional) Selects local password checking. Authentication is based on the username specified withthe username global configuration command.
tacacs - (Optional) Selects the TACACS-style user ID and password-checking mechanism.
Examples:
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 a 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 userenters 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
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, findthe configuration entries for the console line and record the password indicated by the password line configuration command.
Hope this helps a little.