Be careful when Disabling SELinux on RHEL6

Advertisements

To disable SELinux on RHEL6, you must edit the /etc/sysconfig/selinux config file, and add “SELINUX=disabled”. Do not edit the existing “SELINUXTYPE=” like I have done a couple time and rebooted. If you do that, when rebooting you will get a “init Not tainted” error. The only way around this is to log into single user mode (init 1), with SELinux disabled, and then modify the file again (correctly).

Do the following to fix the mistake:

1. Reboot machine and press any key to view Grub menu.
2. Press “e” to edit the commands before starting Linux.
3. Arrow down to the “kernel……” line and press “e” again.
4. Add a space + “selinux=0” + space + “1” to the end and press enter. It should look something like this: ….rd_NO_DM rhgb quiet selinux=0 1
5. Press “b” to boot.
6. vi /etc/sysconfig/selinux
7. Fix the mistyped error to SELINUX=DISABLED. I also comment out the “SELINUXTYPE=…” line. Save and exit VI and reboot.

Good luck. Hopefully no one else makes this mistake, but if so, I hope this helps.

[ad#ad-post]

Advertisements

Add a Comment

Your email address will not be published. Required fields are marked *

(adsbygoogle = window.adsbygoogle || []).push({});