添加用户,并设置用户home目录和设置登录shell为bash:
useradd -r -m -s /bin/bash username
-r (create a system account)
-m (create the user’s home directory)
-s (login shell of the new account)
设置密码:
passwd username
查看是否添加成功:
grep bash /etc/passwd
添加用户,并设置用户home目录和设置登录shell为bash:
useradd -r -m -s /bin/bash username
-r (create a system account)
-m (create the user’s home directory)
-s (login shell of the new account)
设置密码:
passwd username
查看是否添加成功:
grep bash /etc/passwd