The Useradd command is used to establish the user account and create the user's starting directory, and the use of permissions is the ultimate user. Useradd can be used to create user accounts, and he and AddUser commands are the same. After the account is built, use passwd to set the password for the account. The account created by using the Useradd command is actually saved in the/etc/passwd text file.
Language method:
Useradd (option) (User name)
Common choices:
-C: Add note text, note text is saved in passwd's remarks column.
-D: Specifies the start directory at which the user logged in.
-D: Change the preset value.
-e: Specifies the expiration date of the account and the default is permanent.
-F: Specify the number of days after the password expires to close the account.
-G: Specifies the starting group to which the user belongs.
-G: Specifies the additional group to which the user belongs.
-M: Automatically establish the user's login directory.
-M: Do not automatically create a user's login directory.
-N: Cancels the creation of a group named after the user name.
-R: Set up the system account.
-S: Specifies the shell to use when the user is logged in.
-U: Specifies the user ID number.
Application Examples:
Create a new user account and set the ID:
#useradd Username-u 544
It should be stated that the ID value should be set as much as 500 to avoid conflicts. Because the Linux installation will create some special users, generally 0 to 499 of the value between the bin, mail, such as the system account.
#useradd user1-g oinstall-g dba
Create a new User1 user, which initially belongs to the Oinstall group, and also makes him part of the DBA group.
This article is from the "10858195" blog, please be sure to keep this source http://10868195.blog.51cto.com/10858195/1952671
The--useradd of Linux commands