How to Disable or set SELinux to Permissive mode [ID 457458.1]
Applies to:
Linux OS - Version: Enterprise Linux 4.0 to Oracle Linux 5.0 - Release: RHEL4 to OL5Linux x86
Linux x86-64
Linux Kernel - Version: 4.0 to 5.0
Goal
How to fully disable SELinux (Security Enhanced Linux); or set it to "permissive" mode, in which case the SELinux software is loaded, but no enforcing is made of the rules, only logging is performed.Please note that disabling SELinux or setting to
"permissive" mode may have some security considerations. It is possible
to keep SELinux enabled, and add manual exclusion rules.
Solution
To completely disable SELinux, use either of these methods:
1. Edit /etc/selinux/config- Change the SELINUX value to "SELINUX=disabled".
- Reboot the server.
- Edit the kernel boot line and append "selinux=0" to the kernel boot options. For example:
title Red Hat Enterprise Linux AS (2.6.9-42.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/ rhgb quiet selinux=0
initrd /initrd-2.6.9-42.ELsmp.img
- Reboot the server.
To set SELinux to Permissive mode, use either of these methods:
1. Edit /etc/selinux/config- Change the SELINUX value to "SELINUX=permissive".
- Reboot the server.
- Edit the kernel boot line and append "enforcing=0" to the kernel boot options (Assuming SELinux is not set to disabled as in section above). For example:
title Red Hat Enterprise Linux AS (2.6.9-42.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/ rhgb quiet enforcing=0
initrd /initrd-2.6.9-42.ELsmp.img
- Reboot the server.
To check the status of SELinux, issue:
# /usr/sbin/sestatus
See for more details on checking SELinux status.
[@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/161195/viewspace-1055555/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- How to debug release mode program in visual studio
- How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7Linux
- How to disable transparent Hugepage (THP) on Red Hat Enterprise Linux 8?Linux
- How to set word-wrap in VSCode?VSCode
- [20221222]How to Enable and Disable Database Options in oracle 11g.txtDatabaseOracle
- How To Turn SNMP On/Off ? [ID 472530.1]
- What is OPAQUE_TRANSFORM Hint and how to Control it [ID 780503.1]OpaqueORM
- How to Collect Diagnostics for Database Hanging Issues (Doc ID 452358.1)Database
- How to Increase CSS Misscount in single instance ASM installations [ID 729878.1]CSSASM
- 【CURSOR】How to Monitor and tune Open and Cached Cursors (Doc ID 1430255.1)
- [20190522]How to get dump or list parameters set at session level.txtSession
- How to redirect to a specific web page after sign out from Entra IDWeb
- How To Replicate Data from Oracle to Postgres Using GoldenGate (Doc ID 1544137.1OracleGo
- jMeter 裡 CSV Data Set Config Sharing Mode 的含義詳解JMeter
- SELinux: 如何讓selinux對某些命令放行,自定義selinux規則。Linux
- [ERR] 1231 - Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'SQL
- switch_selinux.sh | 開啟或禁用SELinuxLinux
- [20181107]18c set feedback顯示sql_id.txtSQL
- local_irq_disable和disable_irq的區別
- disable Nouveau kernel driver
- bypass disable_functionFunction
- SELinux如何永久禁用Linux
- SELinux 安全模型——TELinux模型
- 什麼是seLinux?Linux關閉seLinux有什麼影響?Linux
- Linux中selinux是什麼意思?SELinux的主要作用有哪些?Linux
- SqlServer 備份集和備份片以及mirror的backup_set_idSQLServer
- alter database disable thread 2Databasethread
- CentOS 8 禁用 SELinux 教程CentOSLinux
- Android SELinux許可權AndroidLinux
- [20190522]DISABLE TABLE LOCK.txt
- SELinux簡介和解決方法Linux
- Linux——防火牆、SELinux規則Linux防火牆
- 說說SELinux工作原則Linux
- SELinux的安全上下文Linux
- javascript strict modeJavaScript
- IDBTransaction.mode
- Docker Swarm modeDockerSwarm
- How to ssh
- Linux伺服器---關閉selinuxLinux伺服器