Type the following:
Linuxsource-Switch1> enable Linuxsource-Switch1# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Linuxsource-Switch1(config)# line console 0 Linuxsource-Switch1(config-line)# password cisco Linuxsource-Switch1(config-line)# login Linuxsource-Switch1(config-line)# end
Don’t forget the login command, otherwise it won’t prompt you for the password!
You can also use option 0 and 7:
Linuxsource-Switch1(config-line)# password ? 0 Specifies an UNENCRYPTED password will follow 7 Specifies a HIDDEN password will follow LINE The UNENCRYPTED (cleartext) line password
– Option 0 Is stored viewable (unencrypted) in your running config!
– Option 7 Is the encrypted password, that you can copy in encrypted format, and paste it on another router/switch.
(Without knowing the real password)