2014년 9월 4일 목요일

rhel 7 레드햇 리눅스 7.0 유저 user 그룹 group 계정 관리

리눅스 7.0에서의 유저 및 그룹 계정 관리는 기존 버전과 크게 다르지 않다.

user add 명령어를 사용하여 유저를 추가한다.

useradd [option] username 

user add 로 생성한 계정은 locked 된 상태로 생성된다. 
unlock을 위해서 root 계정에서 

passwd username

명령어로 생성한 계정의 password를 생성해야한다.  

useradd 명령어 실행 시 다양한 옵션으로 유저에 대한 권한을 사전에 정의 가능하다. ​

- c 'comment' : 유저에 대한 comment 입력
-d 'home_directory': 유저 로그인 시 home 디렉토리 설정 ( default 값은 /home/username/)
-e date : 유저계정의 사용가능 기한 설정 
-f days : 패스워드 만료 후 사용 가능한 기간 설정, 0일 시 만료 후 바로 disabled, -1일 경우 만료후에도 계속 사용가능
-g group_name : 유저 계정이 소속될 group설정
-G group_list : 추가 그룹 등록
-m  : home directory가 없을 시 생성한다. 
-M : home directory를 생성하지 않음
-N : 해당 유저에 대한 별도의 개인그룹을 생성하지않음
-p passwd :  useradd시 패스워드도 같이 설정
-r : UID 를 500이하로 생성하고 홈디렉토리 없이 설정 
-s : 유저 로그인 쉘 설정 default 는 /bin/bash
-u uid : uid설정한다. 499보다 커야한다.


  • useradd(8) — The manual page for the useradd command documents how to use it to create new users.
  • userdel(8) — The manual page for the userdel command documents how to use it to delete users.
  • usermod(8) — The manual page for the usermod command documents how to use it to modify users.
  • groupadd(8) — The manual page for the groupadd command documents how to use it to create new groups.
  • groupdel(8) — The manual page for the groupdel command documents how to use it to delete groups.
  • groupmod(8) — The manual page for the groupmod command documents how to use it to modify group membership.
  • gpasswd(1) — The manual page for the gpasswd command documents how to manage the /etc/group file.
  • grpck(8) — The manual page for the grpck command documents how to use it to verify the integrity of the /etc/group file.
  • pwck(8) — The manual page for the pwck command documents how to use it to verify the integrity of the /etc/passwdand /etc/shadow files.
  • pwconv(8) — The manual page for the pwconv command documents how to use it to convert standard passwords to shadow passwords.
  • pwunconv(8) — The manual page for the pwunconv command documents how to use it to convert shadow passwords to standard passwords.
For information about related configuration files, see:
  • group(5) — The manual page for the /etc/group file documents how to use this file to define system groups.
  • passwd(5) — The manual page for the /etc/passwd file documents how to use this file to define user information.
  • shadow(5) — The manual page for the /etc/shadow file documents how to use this file to set passwords and account expiration information for the system.

댓글 없음:

댓글 쓰기