首页 > 系统服务 > 详细

不存在则创建用户 linux

时间:2016-01-13 00:47:27      阅读:150      评论:0      收藏:0      [点我收藏+]
read aa
file=‘cat /etc/passwd |grep $aa‘
if [ -z $aa ]
then
echo "the user is not exist"
useradd user$aa
else
echo "the user is exist"
fi

不存在则创建用户 linux

原文:http://msjvssg.blog.51cto.com/10012551/1734399

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!