1. When useradd is used, if no Parameter options are added later, for example: # The user created by sudo useradd test is the defaultUser. No home directory, no password, no System Shell. Add a parameter if you do not want to see "NONE". useradd-M Username
2. When adduser is used, the user creation process is more like a human-machine conversation. The system will prompt you to enter various information and then help you create new users based on the information.
In summary, in Ubuntu, adduser is more suitable for beginners, because you do not need to remember the cumbersome Parameter options, as long as you follow the system prompts to proceed step by step, the disadvantage is that the entire creation process is complicated and long. useradd is suitable for users with some high-level experience. It is very convenient to create a line of commands and parameters.
The following describes how to use The userdel user name without adding parameters. In this way, you can only delete accounts, but not user-related documents. If you want to delete user-related documents, userdel-r user name
3. The new user's shell may not be desired. Use CHSH-s [Shell Name]
Modify and then log on again to use the new shell.
Modify the default parameters of the created user:
The relevant parameters are in/Etc/login. defsAnd/Etc/default/useradd files.
Note: Modify the default shell inModified in/etc/default/useradd.
The default home directory is copied by/etc/skel.