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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM