Hello everyone, this time I spoke about the content of the user group, but I divided the content into two parts, each of which was labeled, because this part was really messy when I was studying it, so I enhanced his record. I hope you can practice more. Come on.
Create a user:
Useraddd wo
Delete all user content:
Userdel-r wo
Locked account:
Usermod-L wo
Unlock account: (xiao2
Usermod-U wo
Lock User Password
Passwd-l
Unlock User Password
Passwd-u
View User Password status
Passwd-S
Modify user uid
Usermod-u 500 wo
Modify user gid
Usermod-g 500 wo
Recursively modify all user IDs
Usermod-R 500 wo
Modify the user owner:
Usermod-l old name
Modify the user's own group and modify the user's original additional group name)
Groupmod-n old name
Add an additional group a, B, and c under user wo.
Usermod-G a, B, c wo
Usermod-a, B, c wo
Delete multiple additional groups in a user:
Gpasswd-d user group [root @ 0425 ~] # Gpasswd-d a, B, c wo
The user "a, B, c" is being deleted from the "wo" group.
Gpasswd: Unknown member a, B, c
One user adds multiple additional groups:
Usermod-G group, group, the group user overwrites the original additional group except the main group ,)
Usermod-a-G group, group, group users add new additional groups
X'
Delete group:
[Root @ 0425 ~] # Groupdel c
Add multiple users to a group:
Gpasswd-M User, user group
Delete multiple users in a group:
[Root @ 0425 ~] # Gpasswd-d wo zu
Change the environment variable to display byebye when the user logs out !!!! ----- How to set this?
------------------------------------------------------------
Modify file permissions:
Chmod u g o xu
Modify the object owner
Chown wo xu
Modify the object owner group :-
Chown. wo xu
This article is from the "history_xcy" blog, please be sure to keep this http://historys.blog.51cto.com/7903899/1296619