nexus 给角色赋权限 Creating User Roles and Rules

查看priv-0所具有的权限:

N-2# sh role name priv-0  

Role: priv-0  
  Description: This is a system defined privilege role.  
  vsan policy: permit(default)  
  Vlan policy: permit(default)  
  Interface policy: permit(default)  
  Vrf policy: permit(default)  
  -------------------------------------------------------------------  
  Rule    Perm    Type        Scope               Entity                    
  -------------------------------------------------------------------  
  10      permit  command                         traceroute6 *             
  9       permit  command                         traceroute *              
  8       permit  command                         telnet6 *                 
  7       permit  command                         telnet *                  
  6       permit  command                         ping6 *                   
  5       permit  command                         ping *                    
  4       permit  command                         ssh6 *                    
  3       permit  command                         ssh *                     
  2       permit  command                         enable *                  
  1       permit  read          
N-2#   

查看用户的角色

N-2# sh run | sec usernam
username admin password 5 a2x0  role network-admin
username user password 5 asas4g51  role priv-0

给priv-0添加copy权限

N-2# conf t
Enter configuration commands, one per line.  End with CNTL/Z.
N-2(config)# role name priv-0
N-2(config-role)# rule 11 permit command copy startup-config tftp:
N-2(config-role)# rule 12 permit command copy running-config tftp:
N-2(config-role)# 

检验是否添加成功

N-2# sh role name priv-0

Role: priv-0
  Description: This is a system defined privilege role.
  vsan policy: permit(default)
  Vlan policy: permit(default)
  Interface policy: permit(default)
  Vrf policy: permit(default)
  -------------------------------------------------------------------
  Rule    Perm    Type        Scope               Entity                  
  -------------------------------------------------------------------
  12      permit  command                         copy running-config tftp:
  11      permit  command                         copy startup-config tftp:
  10      permit  command                         traceroute6 *           
  9       permit  command                         traceroute *            
  8       permit  command                         telnet6 *               
  7       permit  command                         telnet *                
  6       permit  command                         ping6 *                 
  5       permit  command                         ping *                  
  4       permit  command                         ssh6 *                  
  3       permit  command                         ssh *                   
  2       permit  command                         enable *                
  1       permit  read        
N-2# 

保存配置

N-2#  copy running-config startup-config 
[########################################] 100%
Copy complete, now saving to disk (please wait)...
N-2# 

参考文件:
https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/nxos/413/b_Cisco_Nexus_5000_Series_NX-OS_Software_Configuration_Guide_Rel_413_n1_1/b_Cisco_Nexus_5000_Series_NX-OS_Software_Configuration_Guide_Rel_413_n1_1_chapter_011000.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值