• Linux系统下批量创建用户


    Linux批量创建用户
    [root@ldapserver ~]# for i in $(seq 1 20) ; do useradd -d /home/ldapuser$i ldapuser#i; done
    [root@ldapserver ~]# grep ldapuser /etc/passwd
    ldapuser1:x:1001:1001::/home/ldapuser1:/bin/bash
    ldapuser2:x:1002:1002::/home/ldapuser2:/bin/bash
    ldapuser3:x:1003:1003::/home/ldapuser3:/bin/bash
    ldapuser4:x:1004:1004::/home/ldapuser4:/bin/bash
    ldapuser5:x:1005:1005::/home/ldapuser5:/bin/bash
    ldapuser6:x:1006:1006::/home/ldapuser6:/bin/bash
    ldapuser7:x:1007:1007::/home/ldapuser7:/bin/bash
    ldapuser8:x:1008:1008::/home/ldapuser8:/bin/bash
    ldapuser9:x:1009:1009::/home/ldapuser9:/bin/bash
    ldapuser10:x:1010:1010::/home/ldapuser10:/bin/bash
    ldapuser11:x:1011:1011::/home/ldapuser11:/bin/bash
    ldapuser12:x:1012:1012::/home/ldapuser12:/bin/bash
    ldapuser13:x:1013:1013::/home/ldapuser13:/bin/bash
    ldapuser14:x:1014:1014::/home/ldapuser14:/bin/bash
    ldapuser15:x:1015:1015::/home/ldapuser15:/bin/bash
    ldapuser16:x:1016:1016::/home/ldapuser16:/bin/bash
    ldapuser17:x:1017:1017::/home/ldapuser17:/bin/bash
    ldapuser18:x:1018:1018::/home/ldapuser18:/bin/bash
    ldapuser19:x:1019:1019::/home/ldapuser19:/bin/bash
    ldapuser20:x:1020:1020::/home/ldapuser20:/bin/bash
    [root@ldapserver ~]# for i in $(seq 1 20) ; do echo ldapuser$i | passwd --stdin ldapuser$i; done
    Changing password for user ldapuser1.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser2.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser3.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser4.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser5.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser6.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser7.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser8.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser9.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser10.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser11.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser12.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser13.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser14.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser15.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser16.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser17.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser18.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser19.
    passwd: all authentication tokens updated successfully.
    Changing password for user ldapuser20.
    passwd: all authentication tokens updated successfully.

    怎么从01开始???

  • 相关阅读:
    springMVC的自定义类型的转换器
    pl/sql
    oracle中的函数
    Oracle基础
    跳台阶算法题
    红黑树
    优先队列
    堆排序
    H5页面,输入框的光标,如果页面上下滑动光标停留在页面上,除了输入框外,松手过了一段时间才跑回输入框里面
    正则:判断为数字,输入的金额整数位不得超过9位,小数位不得超过2位!
  • 原文地址:https://www.cnblogs.com/rusking/p/8030181.html
Copyright © 2020-2023  润新知