2.8 Setting Passwords
The switch ships with a default of no enable password, which allows anyone on the network access to various privilege levels. To prevent unauthorized changes to the switch’s configuration, you should set an enable password for access to switch management. Follow the example below to assign a privileged password.
Router> enable
Password: <no password by default; press Enter>
Router# configure terminal
Router(config)# enable password ?
0Specifies an UNENCRYPTED password will follow
7Specifies a HIDDEN password will follow
LINE The UNENCRYPTED (cleartext) 'enable' password
Router(config)# enable password 0 <password>
Router(config)# exit
Router# write [memory file]
A separate password should be set for the primary terminal line (console) and the virtual terminal lines (telnet). The default password Asante is assigned only to the virtual terminal line Vty0. Up to three other virtual terminal lines may be created, and they each will require a separate password.
Note: It is recommended that you change the default telnet password to prevent unauthorized access to the switch.
Router(config)# line ?
console | Primary terminal line | |
vty |
| Virtual terminal |
Router(config)# line console ? | ||
Line number | ||
Router(config)# line console 0 | ||
end |
| End current mode and change to enable mode |
exit |
| Exit current mode and down to previous mode |
help |
| Description of the interactive help system |
no |
| Negate a command or set its defaults |
password | Set a password | |
quit |
| Exit current mode and down to previous mode |
LINE | The UNENCRYPTED (cleartext) line password | |
0 | Specifies an UNENCRYPTED line password will follow | |
7 | Specifies a HIDDEN line password will follow |
Router# write ?
file | Write to configuration file |
memory | Write configuration to the file (same as write file) |
terminal | Write to terminal |
Router# write file
Writing
Configuration saved to
Router#
The password can be set at unencrypted (level 0) or hidden, or encrypted (level 7).
LINE The UNENCRYPTED (cleartext) line password
0Specifies an UNENCRYPTED line password will follow
7Specifies a HIDDEN line password will follow
16