Red Hat Enterprise Linux에서 SELinux를 비활성화하는 방법은 무엇인가요?
Environment
- Red Hat Enterprise Linux
- SELinux
Issue
- Red Hat Enterprise Linux에서 SELinux를 비활성화하는 방법은 무엇인가요?
Resolution
WARNING
- Red Hat 글로벌 지원 서비스에서는
SELinux
를 비활성화하는 것을 권장하지 않습니다. SELinux
는 보안 보고 및 강제 실행 기능이 누락되는 것을 규제 프레임워크에서 허용하는 상황에서만 비활성화해야 합니다.SELinux
가 비활성화된 상태에서 생성된 파일들은 향후SELinux
가 활성화될 경우 올바르게 작동하는 데 필요한 적절한 레이블을 가지지 않습니다.SELinux
를 다시 활성화할 경우 파일 시스템 재라벨링을 수행해야 합니다. 이는 시간이 많이 소요되는 작업입니다.
SELinux
문제를 해결하기 위해서는 대신 SELinux
를 일시적으로 permissive
모드로 변경할 수 있습니다.
SELinux
정책들은 로드된 상태로 유지됩니다.- 정책을 위반하는 접근 시도들은 여전히 로그에 기록되지만 거부되지는 않습니다.
프로덕션 환경에서 이러한 명령어들을 실행할 때는 주의해서 진행하세요.
Red Hat Enterprise Linux 9
-
grubby
패키지가 아직 설치되지 않았다면 설치하세요.$ sudo dnf install grubby
-
커널 명령줄에
selinux=0
을 추가하도록부트 로더
를 설정하세요.$ sudo grubby --update-kernel ALL --args selinux=0
-
시스템을 reboot 하세요.
$ sudo reboot
SELinux
를 다시 활성화하려면 아래의 명령어를 사용하세요:$ sudo grubby --update-kernel ALL --remove-args selinux
Red Hat Enterprise Linux 8, 7, and 6
다음과 같이 두 가지 가능한 옵션이 있습니다:
방법 1:
-
/etc/selinux/config
파일을 편집하고SELINUX=enforcing
을SELINUX=disabled
로 변경하세요. -
시스템을 reboot 하세요.
$ sudo reboot
방법 2:
-
grubby
패키지가 아직 설치되지 않았다면 설치하세요.$ sudo yum install grubby
-
커널 명령줄에
selinux=0
을 추가하도록부트 로더
를 설정하세요.$ sudo grubby --update-kernel ALL --args selinux=0
-
시스템을 reboot 하세요.
$ sudo reboot
Red Hat Enterprise Linux 5 and 4
다음과 같이 두 가지 가능한 옵션이 있습니다:
방법 1:
-
/etc/selinux/config
파일을 편집하고SELINUX=enforcing
을SELINUX=disabled
로 변경하세요. -
시스템을 reboot 하세요.
$ sudo reboot
방법 2:
-
/boot/grub/grub.conf
파일을 편집하고kernel
라인의 끝에selinux=0
을 추가하세요.다음은 예시입니다:
kernel /vmlinuz-2.6.18-398.el5 ro root=/dev/VolGroup00/LogVol00 selinux=0
-
시스템을 reboot 하세요.
$ sudo reboot
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments