返回文章列表
行业动态

华为、H3C、cisco等设备怎么配置用户并设置三权分立?

恣意
2025-11-14
2小时前
华为、H3C、cisco等设备怎么配置用户并设置三权分立?

H3C

1. 添加用户

#角色名以及角色所在的域

local-user  admin  class  manage

#角色的密码

password  simple  密码

#服务类型

service-type  ssh  http  https  terminal(console)

#用户角色

authorization-attribute  user-role  network-admin


2. 配置远程登录会话

#窗口数量和限制<0-63共最大可64窗口同时登录>

line vty 0 63authentication-mode schemeuser-role network-admin

3. 三权分立

#配置超级管理员(拥有系统最高权限)

local-user admin class managepassword simple abc1234567service-type ssh http https  terminal(console)authorization-attribute user-role network-adminquit

#配置安全日志管理员(管理日志相关)local-user aqadmin class managepassword simple ZJ!@#2023service-type ssh terminal(console)

authorization-attribute user-role level  9

authorization-attribute user-role security-auditquit

#配置操作员(可执行display相关命令)local-user sjadmin class managepassword simple ZJ!@#2023service-type ssh  terminal(console)

authorization-attribute user-role level  1

authorization-attribute user-role network-operator  quit

#配置最大窗口数量(最大可开64个窗口,可自行修改范围)line vty 0 63

#认证模式为AAAauthentication-mode schemeuser-role network-admin

#空闲超时5分钟退出

idle-timeout  5  0quit

save

4. 远程配置

#开启ssh远程服务

ssh  server  enable

#调用acl2000,只有acl规则中允许的ip可以远程ssh访问

ssh  server acl  2000


HUAWEI

1. 创建用户

aaa

local-user  名  password  密码

local-user  名  service-type telnet ssh terminal

local-user  名  privilege level  权限等级


user-interface console 0

au-mode aaa

user-interface  vty  0  4

au-mode  aaa

protocol  inbound  telnet


2. 配置三权分立

aaa

#创建管理用户(最高权限)

local-user  名  cipher 密码

local-user  名  privilege level  15

local-user  名  service-type  服务类型

#创建操作用户

local-user  名  cipher 密码

local-user  名  privilege level  9

local-user  名  service-type  服务类型

#创建日志审计用户

local-user  名  cipher 密码

local-user  名  privilege level  3

local-user  名  service-type  服务类型

3. 配置远程ssh登录

rsa  local-key-pair  create

aaa

local-user  名  password cipher  密码

local-user  名  privilege level 15

local-user  名  service-type  ssh

quit

stelnet  server  enable

ssh  user  名(为aaa中创建的名)

ssh  user  名  authentication-type  password

ssh  user  名  service-type  stelnet

ssh  server  port  端口

undo  telnet service telnet

user- interface  vty  0  4

protocol  inbound  ssh


cisco

system-useruser-name ztepassword ZXR10zxr10.bind authentication-template 1bind authorization-template 1exitauthentication-template 1bind aaa-authentication-template 2001exitauthorization-template 1bind aaa-authorization-template 2001local-privilege-level 15exitexitaaa-authentication-template 2001aaa-authentication-type localexitaaa-authorization-template 2001aaa-authorization-type noneexit

1、LEVEL 0(访问级)。可以用于网络诊断等功能的命令。包括ping、tracert、telnet等命令,执行该级别命令的结果不能被保存到配置文件中。2、LEVEL 1(监控级)。可以执行用于系统维护、业务故障诊断等功能的命令。包括debugging、terminal等命令,执行该级别命令的结果不能被保存到配置文件中。3、LEVEL 2(系统级)。可以执行用于业务配置的命令,主要包括路由等网络层次的命令,用于向用户提供网络服务。4、LEVEL 3(管理级)。最高级,可以运行所有命令:关系到系统的基本运行、系统支撑模块功能的命令,这些命令对业务提供支撑作用。包括文件系统、FTP、TFTP、XModem下载、用户管理命令、级别设置命令等。

配置ssh远程:

1.全局配置模式下开启SSH功能。ZXR10(config)#ssh server enable2.配置AAA认证,配置用户认证方式为Local认证。ZXR10(config)#aaa-authentication-template 2100ZXR10(config-aaa-authen-template)#aaa-authentication-type local/*配置认证方式为Local认证*/ZXR10(config-aaa-authen-template)#exit3.配置用户管理模板并将AAA模板绑定到用户管理模板ZXR10(config)#system-userZXR10(config-system-user)#authentication-template 100ZXR10(config-system-user-authen-temp)#bind aaa-authentication-template 2100ZXR10(config-system-user-authen-temp)#exit4.创建用户,配置用户名、密码并绑定相应的模板。ZXR10(config)#system-userZXR10(config-system-user)#default-privilege-level 0ZXR10(config-system-user)#user-name zteZXR10(config-system-user-username)#bind authentication-template 100ZXR10(config-system-user-username)#password ZTEzte_123ZXR10(config-system-user-username)#exit

本文内容仅供参考,不构成任何专业建议。使用本文提供的信息时,请自行判断并承担相应风险。

分享文章
合作伙伴

本站所有广告均是第三方投放,详情请查询本站用户协议