Skip to content

Split View: Linux User & Group 명령어

|

Linux User & Group 명령어

Overview

HBase를 다루는데 사용하는 HBase Client API의 종류를 알아보겠습니다.

useradd, userdel

useradd주요 옵션

  • -m : 사용자 홈 디렉터리를 함께 생성하면서
  • -d directory : 사용자 홈 디렉터리로 directory를 사용
  • -e date : 사용자 계정을 무효화할 날짜로 date를 지정
  • -g group_id : 사용자 그룹 ID로 group_id 을 사용
  • -G group1, group2 : 사용자 소속 group을 지정 (여러개 지정)
  • -P password : 암호로 password를 설정
useradd,
    # 신규 사용자 생성
    $ useradd user
    # 사용자 생성하면서 계정 사용 종료일 지정
    $ useradd -e 2022-12031 user

    # 사용자 삭제
    $ userdel user

useradd, userdel

groupadd 주요 옵션

  • -g gid: 그룹 id로 gid 사용
  • -o : -g 옵션으로 지정하여 group ID를 생성할 때 이미 이 id가 존재하더라도 애러를 무시하고 그룹 생성
groupadd,
    # 신규로 그룹 생성
    $ groupadd mygroup
    # group_id 555로 지정하여 생성
    $ groupadd -g 555 mygroup
    # 그룹 삭제
    $ groupdel mygroup

이상으로 linux user와 group을 추가하고 삭제하는 방법에 대해 알아보는 이번 포스팅을 마치겠습니다. 감사합니다.

Linux User and Group Commands

Overview

Let's learn about the types of HBase Client APIs used to work with HBase.

useradd, userdel

Key useradd options

  • -m: Create the user's home directory along with the user
  • -d directory: Use directory as the user's home directory
  • -e date: Specify date as the account expiration date
  • -g group_id: Use group_id as the user's group ID
  • -G group1, group2: Specify the user's group membership (multiple groups)
  • -P password: Set password as the password
useradd,
    # Create a new user
    $ useradd user
    # Create a user with an account expiration date
    $ useradd -e 2022-12031 user

    # Delete a user
    $ userdel user

useradd, userdel

Key groupadd options

  • -g gid: Use gid as the group ID
  • -o: When creating a group with a group ID specified by the -g option, ignore errors even if the ID already exists and create the group anyway
groupadd,
    # Create a new group
    $ groupadd mygroup
    # Create with group_id 555
    $ groupadd -g 555 mygroup
    # Delete a group
    $ groupdel mygroup

That concludes this post on how to add and delete Linux users and groups. Thank you.

Quiz

Q1: What is the main topic covered in "Linux User and Group Commands"? How to add or delete Users and Groups in Linux

Q2: What is Key useradd options? -m: Create the user's home directory along with the user -d directory: Use directory as the user's home directory -e date: Specify date as the account expiration date -g group_id: Use group_id as the user's group ID -G group1, group2: Specify the user's group membership (multiple...

Q3: Explain the core concept of Key groupadd options. -g gid: Use gid as the group ID -o: When creating a group with a group ID specified by the -g option, ignore errors even if the ID already exists and create the group anyway That concludes this post on how to add and delete Linux users and groups. Thank you.