- useradd: Adding Users
Format: useradd [options] LOGIN
Parameters:
-r: Create a System account
-U: Specify User ID
-G: Specifies the group ID to which the user belongs
-C: Add comment information
-D: Specify the user's home directory
-S: Specifies the shell used by the user at login
-G: Specify additional groups to which the user belongs
-M: Automatically establish the user's log in directory
Example:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/67/wKiom1Xitm-hY0o4AANc1m0uNcc007.jpg "/>
Create user Oracle, the additional group belongs to database and Sql,id number 3000, home directory is/home/database
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/63/wKioL1XiuI3TUJwOAAQpU3wnwDc485.jpg "/>
- Groupadd: Creating Groups
Format: groupadd [options] Group
Parameters:
-R: Creating a System Group
-G: Specify the Group ID
3. Userdel/groupdel: Delete user/delete group
Format: Userdel [options] LOGIN
Groupdel Group
Userdel Parameters:
-F: Delete the user home directory and its files
4. Usermod/groupmod: Modify account Properties/modify Group Properties
Format: usermod [options] LOGIN
Parameters:
-C: Modify account comment information
-D: Modify home Directory
-E: Modify the expiration date of the account
-S: Modify account Shell
-F: Change the number of days after password expiration to close the account
-U: Unlock password
-L: Lock user password
-L: Modify the account name (online account is not allowed to modify)
Commands for users and groups that are aggregated by Linux commands