Linux operating system create user can set user information, set the specified Uid,gid, user notes information, specify login shell, specify home directory, can set up and modify a lot of content.
such as the following actions
useradd [Options] Username
Useradd-u username Specify UID to establish user
Useradd-u 1111 Tom
USERADD-G username specify GID to establish user
Useradd-g 1111 Jim
USERADD-C username Specify annotation information to establish a user
Useradd-c "My name is Hello" Hello
useradd-d username Specify the home directory to establish the user
useradd-d/hh hh
Useradd-s username Specify shell to establish user
Useradd-s/sbin/nologin H1
Useradd-g GID username Specifies an additional group that must have an existing GID
Useradd-g 1111 H2
Useradd-r Creating a System User
Useradd-r H3
Useradd-m do not create home directories for users
Useradd-m h4
Useradd-m must create a home directory for the user
Modify the user's specified information, also can be modified
usermod [Options] Username
[Options] is an optional option that specifies the user's information
Usermod-u UID Username Modify UID
Usermod-u 1100 Q1
Usermod-g GID username Modify gid
Usermod-g 1111 Q2
Usermod-g GID Username Modify additional groups add user names to the group where the group ID is located
USERMOD-G 1111 Q3
Usermod-c "INFO" username Modify note information
Usermod-c "This is Q4" Q4
Usermod-s/bin/shells username Modify user Default shell
Usermod-s/sbin/nologin/q5
Usermod-l newname Username Modify user Name
This article is from the "12336320" blog, please be sure to keep this source http://12346320.blog.51cto.com/12336320/1912175
Linux Add user information, modify user information