高级搜索 返回首页  
名人名言
哲理小故事
技术文章
    - LINUX文章
山阴客技术文章H3C 设置用户和密码
H3C 设置用户和密码
2020-12-01 12:37:41
by 山阴客  
Rating: not rated yet
1 2 3 4 5 6 7 8 9 10

H3C 设置用户和密码

H3C 设置用户和密码
sys
display local-user
undo password control enable

sys
local-user zhangsanlisi
password cipher mima
authorization-attribute level 3
service-type telnet terminal
或者:
service-type ssh terminal


console 接口登陆认证方式
    配置欢迎信息
    header login information "This is Office1 Router"
    header shell information "welcome to Huawei router VRP lab"
    
配置认证方式和超时时间
<R1>system-view
[R1]user-interface console 0    
[R1-ui-console0]authentication-mode password
Please configure the login password (maximum length 16):huawei
[R1-ui-console0]idle    
[R1-ui-console0]idle-timeout
[R1-ui-console0]idle-timeout 10
[R1-ui-console0]display this

再次进入改超时时间和密码
<R1>system-view
[R1]user-interface console 0
[R1-ui-console0]idle    
[R1-ui-console0]idle-timeout 20
[R1-ui-console0]set authentication password cipher 111
<R1>save


配置路由器远程telnet 连接
<R1>sys    
<R1>system-view
[R1]user-in    
[R1]user-interface vty 0 ?    
[R1]user-interface vty 0 4    
[R1-ui-vty0-4]authentication-mode password
Please configure the login password (maximum length 16):222
[R1-ui-vty0-4]idle    
[R1-ui-vty0-4]idle-timeout 10

[R1]display users    查看连接进来的用户
[R1]display user-interface    查看连接进来的用户


命令分级
0 级    网络诊断命令  ping tracert telnet
1 级    系统维护命令  display current-configuration
2 级    配置命令  sysname R1  
3 级    涉及系统基本运行的命令 文件系统、FTP、配置文件切换、用户管理


用户分级
0-15级
0 级    执行0级别命令
1 级    执行0、1级别命令
2 级    执行0、1、2级别命令
3-15 级  执行0、1、2、3 级别命令

通过console口 连接 用户级别是 3级
通过telnet口 连接 用户级别是0级


设置telnet 连接进来的级别为 2级别
[R1]user-interface vty 0 4    
[R1-ui-vty0-4]display this
[R1-ui-vty0-4]user privilege le    
[R1-ui-vty0-4]user privilege level 2
[R1-ui-vty0-4]display this

[R1-ui-vty0-4]undo user privilege level      撤销用户级别,返回到telnet默认的级别
[R1-ui-vty0-4]display this


需要用户名和密码验证用户:aaa
AAA是验证、授权和记账(Authentication  Authorization  Accounting)

han 用户级别 1
admin 用户级别 3

<R1>system-view
[R1]aaa    
[R1-aaa]local-user admin password cipher 111    
[R1-aaa]local-user admin privilege level 3    
[R1-aaa]local-user admin service-type telnet
[R1-aaa]    
[R1-aaa]local-user han password cipher 222 privilege level 1
[R1-aaa]local-user han service-type telnet
    
[R1-aaa]display this
[R1-aaa]display local-user

telnet 连接AAA认证设置:

[R1]user-interface vty 0 4    
[R1-ui-vty0-4]authentication-mode ?
  aaa       AAA authentication
  password  Authentication through the password of a user terminal interface

[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]displ    
[R1-ui-vty0-4]display this

使用AAA认证,不同的用户有不同的权限
password 认证 不同的连接方式有不同的访问权限


console 口连接也使用AAA认证方法:
[R1]user-interface console 0
[R1-ui-console0]authentication-mode aaa

同一个用户只能使用一种登陆方式要么是consle  要么是telnet

设置一个consle用户登陆,terminal
<R1>system-view
Enter system view, return user view with Ctrl+Z.    
[R1]aaa    
[R1-aaa]local-user wqd password cipher 111 privilege level 3
Info: Add a new user.

[R1-aaa]local-user wqd service-type terminal

推荐给好友 打包下载这篇文章 打印这篇文章

Copyright © 2002 myarticle.com.cn
All rights reserved.

备案号:浙ICP备17002154号-3 Powered by: MyArticle Version 1.0dev
Processed Time: 0.0029 s Querys: 5 [ Gzip Level 0 ]