본문 바로가기
Programming/Linux

useradd / groupadd

by NAMP 2009. 11. 16.
 
  1. useradd -m -k /etc/common ihdcp
    • /etc/skel 디렉토리가 아닌 /etc/common 디렉토리의 환경 설정 파일을 이용하여 ihdcp 계정 생성

     

  2. useradd -g admin -G support -s /bin/bash ihd
    • 로그인 이름 : ihd
    • 소속될 그룹 : admin(기본 그룹), support
    • 기본 (Shell) : /bin/bash

     

  3. groupadd -g 700 ihdcp
    • ihd 그룹 ihdcp GID 700 번으로 생성하는 명령어

     

  4. usermod -g 700 ihd
    • ihd 그룹 아이디를 700 번으로 변경하는 명령어

     

     

     

    1. Usage: useradd [options] LOGIN
    2.  

      Options:

        -b, --base-dir BASE_DIR       base directory for the new user account

                                      home directory

        -c, --comment COMMENT         set the GECOS field for the new user account

        -d, --home-dir HOME_DIR       home directory for the new user account

        -D, --defaults                print or save modified default useradd

                                      configuration

        -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE

        -f, --inactive INACTIVE       set password inactive after expiration

                                      to INACTIVE

        -g, --gid GROUP               force use GROUP for the new user account

        -G, --groups GROUPS           list of supplementary groups for the new

                                      user account

        -h, --help                    display this help message and exit

        -k, --skel SKEL_DIR           specify an alternative skel directory

        -K, --key KEY=VALUE           overrides /etc/login.defs defaults

        -l,                           do not add the user to the lastlog and

                                      faillog databases

        -m, --create-home             create home directory for the new user

                                      account

        -N, --no-user-group           do not create a group with the same name as

                                      the user

        -o, --non-unique              allow create user with duplicate

                                      (non-unique) UID

        -p, --password PASSWORD       use encrypted password for the new user

                                      account

        -r, --system                  create a system account

        -s, --shell SHELL             the login shell for the new user account

        -u, --uid UID                 force use the UID for the new user account

        -U, --user-group              create a group with the same name as the user

     


'Programming > Linux' 카테고리의 다른 글

uname 사용법  (0) 2014.11.10
Wubi 설치  (0) 2012.03.07
Samba 의 소스 파일 및 자세한 사용법을 알고 싶으면  (0) 2009.06.21
awk  (0) 2009.06.02
Process Management  (0) 2009.06.02

댓글