shell添加用户脚本
2011-12-09 09:31
197 查看
vi /home/shell/useradd.sh
#!/bin/bash
i=1
while [ $i -le 5 ]
do
useradd test$i
let i++
done
执行:sh useradd.sh
cat /etc/passwd|grep test
test1:x:502:502::/home/test1:/bin/bash
test2:x:503:503::/home/test2:/bin/bash
test3:x:504:504::/home/test3:/bin/bash
test4:x:505:505::/home/test4:/bin/bash
test5:x:506:506::/home/test5:/bin/bash
本文出自 “游造技术博客” 博客,请务必保留此出处http://youzao.blog.51cto.com/3946111/737752
#!/bin/bash
i=1
while [ $i -le 5 ]
do
useradd test$i
let i++
done
执行:sh useradd.sh
cat /etc/passwd|grep test
test1:x:502:502::/home/test1:/bin/bash
test2:x:503:503::/home/test2:/bin/bash
test3:x:504:504::/home/test3:/bin/bash
test4:x:505:505::/home/test4:/bin/bash
test5:x:506:506::/home/test5:/bin/bash
本文出自 “游造技术博客” 博客,请务必保留此出处http://youzao.blog.51cto.com/3946111/737752
相关文章推荐
- shell批量添加用户时随机生成密码脚本
- shell脚本-添加用户(非交互式)
- shell脚本-批量添加用户并设置随机密码
- shell脚本之批量添加用户
- shell脚本批量添加用户
- Linux下用shell脚本for循环添加用户
- shell脚本-简单的添加用户
- 【shell脚本练习】批量添加用户和设置密码
- 批量添加用户shell脚本详解
- 【shell脚本练习】批量添加用户和设置密码
- 用shell脚本为ubuntu自动添加用户,并限定通过ssh连接该用户只能执行特定某个(或某几个)程序
- Shell脚本添加用户
- 一个简单的循环添加用户SHELL脚本
- shell脚本-批量添加用户
- Shell脚本实现批量添加用户
- shell脚本:批量添加用户,并设置随机字符为密码
- SHELL 脚本批量添加删除用户
- shell脚本-批量添加或删除用户
- Shell脚本添加多用户
- shell脚本-简单的添加用户并统计总用户数