Config user and password
R1>enable R1#config term R1(config)#line con 0 R1(config-line)#password conpass R1(config-line)#login
These commands are used to create a console password on the console port. Remember that after the password is set, you must specify the login command to require authentication on the port.
R1>enable R1#config term R1(config)#line vty 0 15 R1(config-line)#password vtypass R1(config-line)#login
These commands are used to create a password for telnet connections that are made to the device.
R1>enable R1#config term R1(config)#username glen password glenpass R1(config)#line con 0 R1(config-line)#login local R1(config)#line vty 0 15 R1(config-line)#login local
These commands are used to create a username called glen with a password ofglenpass. You then use the login localcommand on each of the console port, auxiliary port, and vty ports to require authentication with a username and password.
R1>enable R1#config term R1(config)#line aux 0 R1(config-line)#password auxpass R1(config-line)#login
These commands are used to create an auxiliary port password on the router. Again, notice the use of the login command after setting the password; if you forget to use it then the router will not prompt for a password on that port.
R1>enable R1#config term R1(config)#enable password mypass R1(config)#enable secret mysecret
These commands are used to create an enable password and an enable secret. Remember that the enable password is stored in clear text within the configuration file while the enable secret is encrypted.
R1(config)#banner motd # Enter TEXT message. End with the character '#'. This device is for authorized personnel only. Please disconnect at once if you have not been given permission to access this device # R1(config)#
This command creates a message-of-the-day banner, which displays before someone logs in. This is used to give legal notice that unauthorized access is prohibited.