1.useradd Add user-G first Group-G-Time group-D specified directory-p (passwd) password-u (UID)
2.userdel Delete User
Usage: # useradd xiaodandan-g xiaodaodan-p 111111 explanation Create a new user Xiaodandan, user group is Xiaodandan, password 6 1
3.groupadd New Group Ls-l View group under home directory-rw-r--r--root root third character root belongs to the root group
4.groupdel Delete Group
5.usermod-g Modifying user groups
-G Add User Group
用法: # usermod -g xiaodaodan xiaodandan 解释:xiaodandan修改用户组为xiaodaodanusermod -L 户名(锁定用户) -u 户名(解除锁定)
6.PASSWD Change Password
Usage: # passwd user Name
New UNIX passwd: Enter the password here
Retype new UNIX passwd: Enter the password again
passwd all ..... Omitted: Done
cat/etc/passwd
Display: Root:x:0:0:root:/root:/bin/bash
First character: User name
Second character: password (password), password generally in /etc/shadow
Third character: 0 on behalf of rooot:1-499 Management account: 500-x General Account
Sixth character: Represents the root directory/root
Normal User/Home
Cat/etc/shadow
Display: root:$ omitted
: Bin:: 17623:0:9999:7:::
First character: User name root corresponds to passwd
Second character: password
Third character: 366(2018-1970) + (2018-1970)/4+1=17632
Common year 365 leap year: 366
* Fourth character: A few days before you can change your password
The fifth character: a few days must be password, general 9999 is the default permanent
Sixth character: Tips for days before password expiration
Seventh character: After the password expires, lock it in a few days
Add: Head: Show front 10 lines
Tail: Show the following 10 lines
Move: Page view
Usage: Cat/etc/shadow |head
Add: Chgrp: Modify file, directory belongs to group
CHGRP Group name File name
Chown: Modify File Owner
Chown-r Account name File name
Linux Create, delete users and user groups; Change password