Skip to content
  • Top

WeMega - Publishing

Homepage
  • Welcome
  • Company
    • Company Business
    • Company Profile
  • Publishing
    • Overview
  • Book Summary
    • Book List
    • Book Review
      • Book Review – All of the IOT Starting with Latest Raspberry Pi from Beginner to Advanced
      • Book Review – 최신 Raspberry Pi로 시작하는 IOT의 모든 것 – 초보에서 고급까지
      • Book Review – ERP SAP R/3 ALE, EDI & IDOC 기술
  • Book Content
    • RaspberryPi
      • RaspberryPi-English
      • RaspberryPi-Korea
    • SAP ALE/IDOC
      • SAP ALE/IDOC-English
      • SAP ALE/IDOC-Korea
  • Book Community
Home
  • RaspberryPi-Korea
Raspberry Pi_Kor_12.7.7 사용자 계정에 대한 사용자 그룹 지정

Raspberry Pi_Kor_12.7.7 사용자 계정에 대한 사용자 그룹 지정

Posted on August 15, 2017 by wemega


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.7  사용자 계정에 대한 사용자 그룹 지정

 

12.7.7.1    처리 방법에 대한 검토 

 

사용자 계정을 어떤 사용자 그룹에 지정하면 그 사용자는 그 그룹이 가지고 있는 모든 책임과 권한을 이어 받게 된다. 또한 특정 사용자 그룹에 어떤 책임과 권한을 부여하게 되면, 그 그룹에 속하는 모든 사용자들에게 동일한 책임과 권한이 부여되게 된다.

 

특정 사용자 계정은 항상 primary group에 소속되면서, 동시에 하나 이상의 다른 사용자 그룹에 소속될 수 있다. 사용자에게 group을 지정하는 방법에는 여러 가지가 있다. 사용자 계정을 생성하면서 동시에 사용자 그룹을 지정할 수도 있고, 사용자 계정을 생성한 이후에 별도의 작업으로 사용자 그룹을 지정할 수도 있다.

 

여기서는 "adduser" 명령을 사용하여 사용자 그룹을 별도로 지정하는 방법을 처리해 보도록 한다.    

 

12.7.7.2    "adduser" 명령을 이용한 사용자 그룹 지정

 

[명령 형식]

adduser [options] user group

 

[명령 개요]

■    사용자 계정을 새로이 정의하거나 기존 사용자 계정에 사용자 그룹을 지정한다.

■    user 권한    -- super user.

 

[상세 설명]

■    None


 

[주요 option]

--group

 

When combined with --system, a group with the same name and ID as the system user is created.  If not combined with --system, a group with the given name is created.  This is the default action if the program is invoked as addgroup.

--system

Create a system user or group.

 

 

 

[Files]

/etc/group

Group account information.

/etc/gshadow

Secure group account information.

 

[사용 Example]

사용자 "guser001"을 새로운 group "ggroup001"에 지정하고자 한다. 작업을 수행하기 전에 "/etc/passwd" 파일을 조회해 보면 사용자 "guser001"이 생성되어 있는 것을 확인할 수 있다. 또한 "/etc/group" 파일에서 사용자 그룹"guser001"을 보면 "1004"라는 id가 부여되어 있고, 동일한 id가 "/etc/passwd"의 사용자 "guser001"에서 지정되어 있는 것을 확인할 수 있다. 또한 "/etc/group" 파일을 조회해 보면 사용자 그룹 "ggroup001"이 생성되어 있는 것을 확인할 수 있다.

 

pi@raspberrypi ~ $ sudo cat /etc/passwd

root:x:0:0:root:/root:/bin/bash

daemon:x:1:1:daemon:/usr/sbin:/bin/sh

~~~~~

guser001:x:1001:1004:General User 001,,,:/home/guser001:/bin/bash

guser002:x:1002:1005:General User 002,,,:/home/guser002:/bin/bash

 

pi@raspberrypi ~ $ sudo cat /etc/group

root:x:0:

daemon:x:1:

~~~~~

guser001:x:1004:

guser002:x:1005:

ggroup001:x:1006:

ggroup002:x:1007:

 


 

사용자 계정 "guser001"에게 group "ggroup001"을 지정하기 위해서 다음과 같은 작업을 수행한다.

 

pi@raspberrypi ~ $ sudo adduser guser001 ggroup001

 

작업이 완료되면 작업의 결과를 확인하기 위해서 /etc/group 파일의 자료를 확인해 본다. 해당 사용자에 대한 내용이 아래와 같이 변경되어 있음을 확인할 수 있다.

 

pi@raspberrypi ~ $ sudo cat /etc/group

root:x:0:

daemon:x:1:

~~~~~

guser001:x:1004:

guser002:x:1005:

ggroup001:x:1006:guser001

ggroup002:x:1007:

 

 

 

RaspberryPi-Koreaapache, debian, interface, iot, linux, logon user, mysql, php, raspberry pi, raspbian, sensor, super user, system default user, user, User Account, user group, working user

Post navigation

Previous
Next

Book Content

  • RaspberryPi
    • RaspberryPi-Korea
    • RaspberryPi-English
  • SAP ALE/IDOC
    • SAP ALE/IDOC-Korea
    • SAP ALE/IDOC-English

Search Post

Recent Posts

  • RaspberryPi-Korea – Post List
  • RaspberryPi-English – Post List
  • SAP ALE/IDOC-Korea – Post List
  • SAP ALE/IDOC-English- Post List
  • SAP ALE IDOC EDI-Kor_10.2.2 File Transfer Protocol(FTP)
May 2025
M T W T F S S
« May    
 1234
567891011
12131415161718
19202122232425
262728293031  

WeMega. 사업자 등록번호 : 000-00-00000. 주소 : 07328 서울시 영등포구 여의도동 국제금융로
Phone : 070-8260-2560. Fax : 02-783-0402. E-Mail : manager@wemega.com

© WeMega - Publishing 2025
Big Impresa designed by Iografica Themes.