A user account
1.useradd command - increasing user account
command format
useradd [option] username
Common options
-u: specifies the user's UID number, UID number is not required to change other users
-d: specifies the location of the user's home directory
-e specified user account expiry time may be used YYYY-MM-DD date format
-s : Specifies the user's login Shell
Example 1: New demo account specified expiration date of the account and can not login
passwd command - set / change user password
Examples of demo password
passwd-- account set
parameters
-d to clear the specified user password
-l locking account
-S view the user account status
-u unlock user accounts
Examples of locking accounts demo
usermod command - modify user account attribute
parameter
-u modify the user's UID number
-d modify the host directory location
-e modify user account expiration time
-s Specifies the user's login Shell
the -l Change the user account login name
-L Lock user accounts
-U unlock account
Examples: lock the account and unlock accounts
instance two demo account name to demo1
userdel-- delete user accounts
-r delete home directory
Group account files
and group accounts associated with two profiles:
/ etc / Group deposit account name, GID group members
/ etc / gshadow group account password encryption
account groupadd-- increase group
Example:
Add a group demoA group
gpasswd-- increased, provided, delete group members
-a plus how the group members
-d delete group members
instance: how is added to the root set of user demo1
Example 2 will remove from the root demo group
groupdel - delete group accounts
Example 3 deleted demoA group
Query account information
id-- view the user account identity
groups-- query the user login account belongs to the group
w command - query the current situation host of user login