New Ubuntu user and specify the directory

For example, I want to create a new user nginx, and specify the directory, allowing the use bash Login

sudo useradd -d "/home/nginx" -m -s "/bin/bash" nginx
passwd nginx

 

 passwd login password to modify nginx

 

Guess you like

Origin www.cnblogs.com/passedbylove/p/12035696.html