Windows/Linux/交换机设备增/删用户命令

  • Windows设备

      Windows终端cmd模式下:

      添加帐号: net user $account $password /add

      删除帐号: net user $account /delete

      查看帐号: net user

  • Linux设备

      添加帐号1: useradd -p `openssl passwd -1 -salt 'user' $password` $account (添加帐号的同时设置密码)

      添加帐号2: useradd $account 先添加帐号

      passwd $account 再设置密码

      删除帐号: userdel -r $account

  • 交换机

      1. Cisco

      添加帐号:在configure terminal模式下 username $account password $password

      删除帐号:在configure terminal模式下 no username $account

      2. ruijie

      添加帐号:在configure terminal模式下 username $account password $password

      删除帐号:在configure terminal模式下 no username $account

      3. maipu

      添加帐号:在configure terminal模式下 user $account password 0 $password

      删除帐号:在configure terminal模式下 no user $account

      4. huawei

      添加帐号:在system-view模式下 local-user $account 添加帐号

      password simple $password 设置密码

      service-type telnet ssh level 1 设置Telnet、ssh登录权限以及帐号等级

      删除帐号:在system-view模式下 undo local-user $account

      5. h3c

      添加帐号:在system-view模式下 local-user $account 添加帐号

      password simple $password 设置密码

      service-type telnet ssh level 1 设置Telnet、ssh登录权限以及帐号等级

      删除帐号:在system-view模式下 undo local-user $account

 

     【注】:以上$account为具体帐号名,$password为密码,除了这两个字符外其余字符不变。

 

  • 0
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值