numerical calculation · Episode 10: Mixed-integer secondary plan (CVXPY version)

2023-01-23   ES  

User group management

1. User group file/etc/group

[[email protected] ~]# tail -N3/ETC/Group // View data of the last three lines under the/group

Note: The result of the output is the same as the first three lines of/etc/passwd. Please refer to the first three lines of the previous blog post/ETC/PASSWD.

2. User backup instructions

  • Enter the command, don’t return to the car, use TAB to complete, the following effect will be displayed
[root@localhost ~]# ls /etc/shadow  // Password configuration file
shadow   shadow-           
[root@localhost ~]# ls /etc/passwd  // User configuration file
passwd   passwd-  
[root@localhost ~]# ls /etc/group  // User group file
group   group-  
[root@localhost ~]# ls /etc/gshadow  // User group password configuration file
gshadow   gshadow-  

Note: The group-, passwd-, represents the backup file of the file, if the user or the file is deleted, recover with it.

3. Added and delete user group

  1. command grammar
    groupadd [-g GID] groupname

  2. command description
    new user group

  3. command option
    -G custom GID. If you do not add -G options, you can create a group according to the default GID of the system. Like UID, GID starts from 1 1.

command example

  • Create user group
[root@localhost ~]# groupadd grpp1      // Create user group
[root@localhost ~]# tail -n1 /etc/group      // View the last line of user group files (group). (Each user group is created by default, and a line of data will be added in the last line of the group file).
grpp1:x:1004:     // Refer to the first three lines of/ETC/PASSWD
  • While creating a user group, custom GID (GID must be above 1000, and the system user group is within 1000)
[root@localhost ~]# groupadd -g 6666 grpp2
[root@localhost ~]# tail -n1 /etc/group
  • Delete the user group (Groupdel)
[[email protected] ~]# groupdel grpp2
[[email protected] ~]# tail -n3 /etc/group

can be seen from the code that GRPP2 has been deleted.

Note: When we delete the user group, the premise is that there are no users in the user group.


Related Posts

Day 12 EventBus and Design

The most dirty technical interpretation in history, I even understood in seconds

Spring Cloud appears processing

EXTJS 6 GRID Example (ASP.NET MVC4 project)

numerical calculation · Episode 10: Mixed-integer secondary plan (CVXPY version)

Random Posts

TCP protocol send and receive data Bryce

mobile phone custom code film Q

VIEAPAGER small dot

Use NLTK to perform segments

Minor Program Falls Flowing Layout (General Method) The development of small programs has been restricted. Therefore, the development ideas of H5 and APP are prone to problems. Graduation design needs to be used in waterfall flow. There are mainly three methods on the Internet, but basically there are problems.