Switch#show running-config       //查看交换机当前配置
配置enable明文口令
Switch#(config)#enable password cisco
Switch#(config)#exit
Switch#show running-config
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch  
!
enable password cisco    //enable密码以明文保存:cisco
!
ip subnet-zero
...
 
配置enable加密口令        //使能模式同时配置明文口令和加密口令,加密口令优先
Switch(config)#enable secret ciscosecret
Switch#show running-config
Building configuration...
Current configuration : 901 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$NaWU$zXJWJzd7DSE8HkfQj2aOj0     //enable密文
enable password cisco
!
no aaa new-model
...
配置console口令
Switch(config)#line consele 0
Switch(config-line)#password pass
Switch(config-line)#login
Switch#show running-config
...
ip http server
!
line con 0
password 123
login