security setting role 추가 및 script 수정

This commit is contained in:
ByeonJungHun
2024-01-10 16:14:53 +09:00
parent 349cd3ff7a
commit b1f72b0a10
3 changed files with 30 additions and 2 deletions

View File

@@ -3622,7 +3622,7 @@ U_02 # 랜덤 패스워드를 사용중이라 제외
U_03 # 계정 잠금 임계값 설정 U_03 # 계정 잠금 임계값 설정
U_04 # 패스워드 파일 보호 U_04 # 패스워드 파일 보호
U_05 # root 홈, 패스 디렉터리 권한 및 패스 설정 U_05 # root 홈, 패스 디렉터리 권한 및 패스 설정
U_06 # 파일 및 디렉터리 소유자 설정 #U_06 # kubernetes를 사용함으로 어쩔 수 없는 부분
U_07 # /etc/passwd 파일 소유자 및 권한 설정 U_07 # /etc/passwd 파일 소유자 및 권한 설정
U_08 # /etc/shadow 파일 소유자 및 권한 설정 U_08 # /etc/shadow 파일 소유자 및 권한 설정
U_09 # /etc/hosts 파일 소유자 및 권한 설정 U_09 # /etc/hosts 파일 소유자 및 권한 설정

View File

@@ -0,0 +1,26 @@
---
- name: shadow mode change
file:
path: /etc/shadow
mode: 0400
- name: hosts mode change
file:
path: /etc/hosts
#mode: u=rw,g=r,o=r
mode: 0600
- name: rsyslog mode change
file:
path: /etc/rsyslog.conf
mode: 0640
- name: crontab mode change [1]
file:
path: /usr/bin/crontab
mode: 0750
- name: crontab mode change [2]
file:
path: /bin/crontab
mode: 0640

View File

@@ -5,4 +5,6 @@
- include: all_setting_root_ssh.yml - include: all_setting_root_ssh.yml
- include: debian_setting_password_rule.yml - include: debian_setting_password_rule.yml
when: ansible_facts.os_family == 'Debian' when: ansible_facts.os_family == 'Debian'
- include: all_setting_mode_change.yml