반응형

CentOS 버전확인 방법!


cat /etc/*-release


실행 예시



다른 Linux 버전 확인

http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_%EC%A2%85%EB%A5%98_%ED%99%95%EC%9D%B8,_%EB%A6%AC%EB%88%85%EC%8A%A4_%EB%B2%84%EC%A0%84_%ED%99%95%EC%9D%B8

위 사이트 참고.

반응형

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

CentOs ssh접속 user 계정 추가/삭제.  (2) 2015.12.03
반응형

CentOs에 root외 ssh접속 유저 계정을 만드는 방법

Centos 6.7 (Final) version


생성 방법

1.  useradd [options] LOGIN

   ex) useradd black  -> black이라는 유저 생성

         ID에 생성할 유저 ID를 넣으면 된다.

         /home/ 폴더에 유저 폴더 생성이 된다.

options :

     -b, --base-dir BASE_DIR                          base directory for the home directory of the new account

     -c, --comment COMMENT                      GECOS field of the new account

     -d, --home-dir HOME_DIR                       home directory of the new account

     -D, --defaults                                             print or change default useradd configuration

     -e, --expiredate EXPIRE_DATE                 expiration date of the new account

     -f, --inactive INACTIVE                               password inactivity period of the new account

     -g, --gid GROUP                                          name or ID of the primary group of the new account

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

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

     -k, --skel SKEL_DIR                                   use this alternative skeleton directory

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

     -l, --no-log-init                                          do not add the user to the lastlog and faillog databases

     -m, --create-home                                   create the user's home directory

     -M, --no-create-home                              do not create the user's home directory

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

     -o, --non-unique                                      allow to create users with duplicate (non-unique) UID

     -p, --password PASSWORD                    encrypted password of the new account

     -r, --system                                               create a system account

     -s, --shell SHELL                                       login shell of the new account

     -u, --uid UID                                             user ID of the new account

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

     -Z, --selinux-user SEUSER                        use a specific SEUSER for the SELinux user mapping

2. passwd ID

    ex) passwd black -> black 유저 비밀번호 설정.

         생성한 유저 ID의 비밀번호를 설정한다.

         비밀번호가 짧고 숫자나 문자로만 되어있으면

         잘못된 암호: 너무 짧습니다  

         잘못된 암호: 너무 간단함

         라는 메세지가 출력되지만 무시하고 설정하면 비밀번호 설정이 된다.(비추)

삭제 방법

1. userdel [options] LOGIN

    ex) userdel black -> black 유저 삭제

          /home/경로에 생성된 유저 폴더는 삭제가 안된다.

options :

     -f, --force                                           force removal of files, even if not owned by user

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

     -r, --remove                                      remove home directory and mail spool

     -Z, --selinux-user                              remove SELinux user from SELinux user mapping

반응형

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

CentOS 버전 확인  (0) 2016.01.18

+ Recent posts