第三章用户访问和权限管理 3
设置用户名和密码 提问 为每个单独的人员设置不同的用户名和密码 回答 Router1#configure terminal Enter configuration commands, one per line
End with CNTL/Z
Router1(config)#username neoshi password ioscookbook (username weak nopassword) Router1(config)#aaa new-model Router1(config)#aaa authentication login local_auth local Router1(config)#line vty 0 4 Router1(config-line)#login authentication local_auth Router1(config-line)#exit Router1(config)#end Router1# 注释 设置单独的用户名和密码的好处就不用多说了,这里只提一个就是在日志中会显示谁做了修改,比如%SYS-5-RELOAD: Reload requested by kdooley on vty0 (172
另外在 username 这个命令里面还有一个autocommand 的选项,实现登录以后自动执行某个特定的命令的作用,下面 的例子就是一个用户名为run 无密码,登录以后显示完端口状态就自动退出的例子,很好用吧 Router1#configure terminal Enter configuration commands, one per line
End with CNTL/Z
Router1(config)#aaa new-model Router1(config)#aa