[Linux] User Management: Group Management

User management: management of groups

User group
Similar to introducing roles, the system can manage multiple users with commonality in a unified manner.

increase group

groupadd 组名

delete group

groupdel 组名

Add groups directly when adding users

useradd -g 用户组 用户名

Modify user group

usermod -g 用户组 用户名

User Management: User and Group Configuration Files

/etc/passwd,/etc/group,/etc/shadow

etc is not an abbreviation, it is the meaning of and so on comes from the French et cetera translated into Chinese is the meaning of etc. As for why the configuration file is stored under /etc, according to the original UNIX statement (linux file structure refer to the teaching of UNIX Implementing MINIX) Here are a bunch of bits and pieces, called etc. This is actually a legacy.
This directory is generally used to store the configuration files of the entire file system required by the program .

/etc/passwd
  User database with fields giving username, real name, home directory, encrypted password and other information about the user.
/etc/group
  Similar to /etc/passwd, but for groups instead of users.
/etc/shadow
  On systems with shadow password software installed The shadow password file on the file. The shadow password file moves the encrypted password in the /etc/passwd file into /etc/shadow, which is only readable by root. This makes it more difficult to decipher the password
.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325478134&siteId=291194637