Raspberry Pi_Eng_12.7.5 “addgroup” Command – Create User Group


Published Book on Amazon


All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2


출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)


Original Book Contents


12.7.5  "addgroup" Command Create User Group

 

You can use "addgroup" and "groupadd" commands to create user groups. The "addgroup" command makes it easy to create user groups. On the other hand, the "groupadd" command can handle relatively detailed processing with very low-level commands, but it is complex to use and is not used for general purposes.

 

A user group can be created separately, but a user group can be created at the same time as a user account is created. You can use the" adduser" command to do this. For more information, refer to the explanation in [12.4.3 "adduser" Command Create User].

 

The "addgroup" command is used to create a new user group. You can specify the attribute value for the user group by using various options, and the attribute value not specified in the option is set to the default value specified by the system.

 

[Command Format]

addgroup   [options]   group

 

[Command Overview]

   This creates a new user group.

   User privilege          -- Super user.

 

[Detail Description]

   The "addgroup" command adds a new user group to the system according to the settings specified in the Shell option and "/etc/adduser.conf" file.

 

[Main Option]

-h, --help

Display help message and exit.

--system

Create a system user or group.

 

 

 

[Files]

/etc/group

Group account information.

/etc/gshadow

Secure group account information.

/etc/login.defs

Shadow password suite configuration.

 

[Used Example]

To create a new group "ggroup001", do the following task.

 

pi@raspberrypi ~ $ sudo addgroup ggroup001

 

When the operation is complete, check the data in the "/etc/group" file to see the results of the operation.

 

pi@raspberrypi ~ $ sudo cat /etc/group

root:x:0:

daemon:x:1:

~~~~~

ggroup001:x:1004: