useradd-d/home/test-m test;
passwd test;
Then set the password to test.
1. Useradd Add users or update default information for newly created users
Syntax: useradd option user name
The options for this command have the following meanings:
-C Comment describes the new user account, usually the user's full name and comment as a string. -D home_dir sets the user home directory, the default is the user's login name, and is placed in the/O directory. -D Saves the default information for the new account setting after the new account is created. -e expire_date Set the account expiration date in mm/dd/yyyy format. -F Inactivity sets the password expiration time, which is 0 invalidates the password payback immediately, and 1 invalidates the option. -G group sets the base group for which the new user is to be created, group name. -K Skel_dir sets the framework directory, which contains the user's initial profile, and the files under that directory are copied to the user's home directory when the user is created. -M automatically creates the user home directory and copies the files under the framework directory (default =/etc/skel) to the user's home directory. -M does not create a user home directory. -R allows reserved system accounts to create a new account with the user ID. -S Shell Specifies the user's login shell. -U user_id
Linux creates accounts and automatically generates files in home directory and home directory