User and group actions
The Linux operating system is stable, secure, and its "user and group" management is inseparable, I first look at the real life of the project group of Simple management:
The task of setting permissions for the user to manipulate files is cumbersome and not implemented.
When Linux creates a user, it will consider the creation of a group system to add and subtract files, but also a file into a group inside
So that the system administrator only need to care about the user is that group , you can know what the user specific file operation permissions.
User and group operations for Linux:
1. Group Operations (/etc/group)
① Add Group information Groupadd (there is no space attached to the write)
># Groupadd grouname//Create a group
② modifying the name of a group
># groupmod-g Group number-N new name GroupName
③ Delete Group (if there is user information under Group, delete is forbidden)
># Groupdel Group Name
2. User Action (/etc/passwd)
① Add user Useradd
USERADD-G group number-u user number-D User home directory username
># useradd username//Create an ordinary user without setting the user group information, create a group with the same name as the user name
> # useradd-g Group number username// Create A user while the Its group settings ( This will not Create the same name Group )
Exercise: Use the root account to add a group ID of 505 User ID 510 home directory under/var/xueyou users xueyou
② User Modify operation (group, ID, home directory) users Modify
USERMOD-G group number-u user number-D home directory-L newname username
># usermod-g GID username//Modify user group number information (common)
③ User Delete
># Userdel User name//delete user
># userdel-r username//delete user at the same time, also delete user home directory
④ setting a password for the specified user
PDF file Download:
http://download.csdn.net/detail/obuyiseng/9031425
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Basic Linux Tutorials---user and group actions