例如我要新建一个nginx用户,并指定目录,允许使用bash登录
sudo useradd -d "/home/nginx" -m -s "/bin/bash" nginx passwd nginx
passwd用于修改nginx的登录密码