selinux:turn_off_selinux
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
selinux:turn_off_selinux [2019/12/04 20:31] – removed peter | selinux:turn_off_selinux [2020/07/24 07:20] (current) – old revision restored (2016/07/11 14:09) 92.220.10.100 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== SELinux - Turn off SELinux ===== | ||
+ | |||
+ | Type the following command: | ||
+ | |||
+ | <code bash> | ||
+ | echo 0 >/ | ||
+ | </ | ||
+ | |||
+ | You can also use the setenforce command to effectively disable it, enter: | ||
+ | |||
+ | <code bash> | ||
+ | setenforce Permissive | ||
+ | </ | ||
+ | |||
+ | OR | ||
+ | |||
+ | <code bash> | ||
+ | setenforce 0 | ||
+ | </ | ||
+ | |||
+ | The above commands will switch off SELinux enforcement temporarily until the machine is rebooted. | ||
+ | |||
+ | <code bash> | ||
+ | vi / | ||
+ | </ | ||
+ | |||
+ | And set / update it as follows: | ||
+ | |||
+ | <file bash / | ||
+ | SELINUX=disabled | ||
+ | </ | ||
+ | |||
+ | Save and close the file. The above will only work in CentOS, Fedora and RedHat Enterprise Linux systems. | ||
+ | |||
+ | <file / | ||
+ | title Red Hat Enterprise Linux Server (2.6.18-194.26.1.el5) | ||
+ | root (hd0,0) | ||
+ | kernel / | ||
+ | initrd / | ||
+ | </ | ||
+ | |||
+ | Finally, reboot the system: | ||
+ | |||
+ | <code bash> | ||
+ | reboot | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Grub ===== | ||
+ | |||
+ | SELinux is often also configured in the grub bootup configuration. | ||
+ | |||
+ | If you can’t locate the / | ||
+ | |||
+ | Search **/ | ||
+ | |||
+ | <code bash> | ||
+ | egrep -i ' | ||
+ | </ | ||
+ | |||
+ | If you found lines with selinux=0 or enforcing=0, | ||
+ | |||
+ | Example: | ||
+ | |||
+ | <file bash / | ||
+ | # cat / | ||
+ | default=0 | ||
+ | timeout=5 | ||
+ | splashimage=(hd0, | ||
+ | hiddenmenu | ||
+ | title Enterprise Linux Enterprise Linux Server (2.6.18-92.el5PAE) | ||
+ | root (hd0,0) | ||
+ | kernel / | ||
+ | initrd / | ||
+ | title Enterprise Linux Enterprise Linux Server (2.6.18-92.el5) | ||
+ | root (hd0,0) | ||
+ | kernel / | ||
+ | initrd / | ||
+ | </ | ||
+ | Reboot the server: | ||
+ | |||
+ | <code bash> | ||
+ | reboot | ||
+ | </ | ||
selinux/turn_off_selinux.1575491503.txt.gz · Last modified: 2020/07/15 09:30 (external edit)