手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网络知识>Cisco技术>列表

Cisco IOS Cookbook 中文精简版第三章用户访问和权限管理

来源:互联网 作者:west263.com 时间:2008-02-23
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

第三章 用户访问和权限管理

3.1. 设置用户名和密码

提问 为每个单独的人员设置不同的用户名和密码

回答

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.25.1.1).另外在username这个命令里面还有一个autocommand的选项,实现登录以后自动执行某个特定的命令的作用,下面的例子就是一个用户名为run无密码,登录以后显示完端口状态就自动退出的例子,很好用吧

Router1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router1(config)#aaa new-model

Router1(config)#aaa authentication login default local

Router1(config)#aaa authorization exec default local

Router1(config)#username run nopassword noescape

Router1(config)#username run autocommand show ip interface brief

Router1(config)#end

Router1#

3.2. 加密密码

提问 加密密码从而在配置文件中不明文显示

回答

Router1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router1(config)#enable password oreilly

Router1(config)#line vty 0 4

Router1(config-line)#password cookbook

Router1(config-line)#line con 0

Router1(config-line)#password cookbook

Router1(config-line)#line aux 0

Router1(config-line)#password cookbook

Router1(config-line)#exit

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!