$
학습 Linux 안내서
ko
XP:0
퀘스트 141Group Manager
+220 XP

Modifying User Groups & Shell (usermod)

이 퀘스트를 위한 인터랙티브 터미널 시작→설치 불필요 • 브라우저에서 바로 실행

개념 및 개요

When onboarding engineers or automation service accounts, you must configure their supplementary group memberships and default login shells. In Linux, usermod modifies existing accounts in /etc/passwd and /etc/group.

- -aG : Appends the user to supplementary groups without removing them from existing groups. (CRITICAL: omitting -a would replace all existing secondary groups!).
- -s : Specifies the new login shell (e.g. /bin/bash or /usr/sbin/nologin).

Let's modify account permissions for deployer. Add user deployer to the sudo group using sudo usermod -aG sudo deployer, then change their login shell to bash using sudo usermod -s /bin/bash deployer.

명령어 구문 참조

Command / SyntaxDescription
sudo usermod -aG sudo deployerAppend user deployer to administrative sudo group
sudo usermod -s /bin/bash deployerSet default shell to bash for user

검증 목표

  • ○
    Add deployer to sudo group with usermod -aG
  • ○
    Update deployer login shell to /bin/bash

퀘스트를 완료할 준비가 되셨나요? 141?