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 Check whether SELinux is Enabled or Disabled [ID 432988.1]Linux
- How to Duplicate a Database in NOARCHIVELOG mode (Doc ID 275480.1)DatabaseHive
- How to Check and Enable/Disable Oracle Binary Options (文件 ID 948061.1)Oracle
- How To List All The Named Events Set For A Database [ID 436036.1]Database
- How to Start 11gR2 Grid Infrastrucure in Exclusive Mode (Doc ID 1364971.1)AST
- How to Disable Asynch_io on HP to Avoid Ioctl Async_config ErrorError
- How to set up printers for GUI?GUI
- oracle OEM中 Accessibility Mode disable解決辦法Oracle
- How To List All The Named Events Set For A Database (Doc ID 436036.1)Database
- How do I disable the iptables firewall in Fedora Core Linux?Linux
- How do you find that an operation mode switch occurred?
- Oracle 12c Rac Set Archive ModeOracleHive
- How to get and set the system socket buffer in AIXAI
- How to use ASMCA in silent mode to configure ASMASM
- MySQl報錯之@@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ONMySql
- 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
- How to debug release mode program in visual studio
- How to set up Software raid1 configuration on a running systemAI
- disable/enable validate/novalidate 的區別
- How to config (no)archivelog mode and manage archive log files by RMANHive
- IDBTransaction.mode
- Understanding How to Set the SQL Server I/O Affinity OptionSQLServer
- Constraint State(disable/enable validate/noalidate)AI
- How to Set Device Name Using UDEV on Oracle Linux 7.1devOracleLinux
- How to: Use Resources to Set Property Values in Web Server ControlsWebServer
- How to: Set the Culture and UI Culture for ASP.NET Web Page GlobalizationUIASP.NETWeb
- [20221222]How to Enable and Disable Database Options in oracle 11g.txtDatabaseOracle
- SELinux on Android的進展情況LinuxAndroid
- ORA-00265: instance recovery required, cannot set ARCHIVELOG modeUIHive
- [Err] 1231 - Variable 'sql_mode' can't be set to the value of 'NULLSQLNull
- SELinuxLinux
- How To Kill Good IdeasGoIdea
- SELinux: 如何讓selinux對某些命令放行,自定義selinux規則。Linux
- alter table modify constraint_disable_enable_novalidateAI
- local_irq_disable和disable_irq的區別
- Set up the Android SDKAndroid