First, the user account management
1, user classification
Supervisor: uid = 0, gid = 0 maximum authority
Common User: uid> = 500
User program: 1 <= uid <500, or the system can not be used to log management system
2, UID: user identification
3, GID: Group ID
Second, file
1, the user account file
/etc/passwd
The first field: user name
The second field: the password file
The third field: uid number
Fourth field: gid number
The fifth field: User Notes
Sixth field: the user's home directory
Seventh field: shell login (login: / bin / bash can not log: / sbin / nologin)
2, password files
/etc/passwd
The first field: user name
The second field: ciphertext
The third field: the account was last modified time from January 1, 1970 the number of days past
Fourth field: the number of days since the last change the password can not be changed again ( "0" can be modified at any time)
The fifth field: the number of days the password expires, you must re-edit ( "99999" indicates permanent use) to modify the number of days in
Sixth field: Force Change Password remind Days
Seventh field: the number of days after password expiration is disabled
The eighth field: password expiration date, expiration date from January 1, 1970 the number of days
Third, on the user
1, Add Account
useradd [options] username
-u: uid designated mark
-g: Specifies the basic group
-d: Specifies the home directory
-M: do not build the home directory for the user to initialize
-e: Specifies the account expiration time
-s: shell specified user login
-g: Basic user group name
-G: Additional user group name
-c: Add notes
example:
Create your own user name
Create a cloud directory
Create a cloud computing user, uid is 566 , the home directory for cloud computing can not shell, add notes cloud computing, specify the name of the group for their own group
2, Set, change the user password
passwd [options] username
-d: clear the user password
-l: Lock user accounts
-u: Unlock user accounts
-S: view the user account status (if locked)