Original: http://106.13.73.98/__/90/
Create a user -
useradd
.
Command Format:useradd [参数] 用户名
useradd
can also be writtenadduser
.
Parameters are as follows
-u
Specifies the UID number-d
Specifies the home directory-e
Specifies the effective time-g
Specify the basic group-G
Specify additional group-M
Does not create host directories-s
Specifies the shell-r
When used to delete a user, delete the home directory-f
Generally used to force a user to delete.
Complementary command:
echo '密码' | passwd --stdin 用户名
set a password directly to a specific user
Set user password -
passwd
.
Format:passed [参数] 用户名
.
Parameters are as follows
-d
Empty password-l
Lock the user, locking labeledLK
, through the parameters-S
view-u
Unlock the user to unlock labeledPS
-S
Uppercase, see the user status
Change User Properties -
usermod
.
Command Format:usermod 参数 用户名
the usermod command with all the parameters of useradd.
.
Also contains the following parameters parameters
-l
Change User-L
Lock the user-U
Unlock user
Group Management -
groupadd
.
Creating a group:groupadd [-g GID] 组名
.
Parameters are as follows
-u
Add a member-d
Remove a member-M
Redefine the list of group members to,
separate.
To delete a group:groupdel 组名
Check user information
.
id 用户名
Check user identity mark
.
groups 用户名
Charles groups the user belongs
.
users
/w
/who
Check the logged-in user information
***user
- Superuser (root): UID and GID are
0
- Program User: UID is
1-499
usually no home directory- Average user: UID as the
500-6000
default start accumulating from 1001
group
- The basic group (private group): Each user belongs to a private group the largest private group can not be deleted
- Additional groups (Public Group) : Each user can belong to any common group
Related documents
. Basic user information file storage format: . User shadow password file, used to store password information . Ordinary user's home directory, usually the user name their files from / copied from the . Group information file
/etc/passwd
用户名:密码占位符:UID:GID:描述信息:宿主目录:登陆shell
/etc/shadow
/home/文件名
/etc/skel
/etc/group
Original: http://106.13.73.98/__/90/