cd /opt ls mkdir shell ls cd shell ls vi test2.txt
#!/bin/bash id $1 &>/dev/null && echo "User $1 exist" && exit 2 id $1 &>/dev/null || useradd $1 id $1 &>/dev/null && echo "$1" | passwd --stdin $1 &>/dev/null && echo "Add User $1 Success."
本文出自 “素颜” 博客,请务必保留此出处http://suyanzhu.blog.51cto.com/8050189/1943400
原文地址:http://suyanzhu.blog.51cto.com/8050189/1943400