How to disable selinux
In this article we are going to check how to disable SELinux in Centos Box. SELinux brings lot of security measures to your Linux box.It will provide an additional level of access control mechanism to files and folders on top of normal Linux security tools.So SELinux gives system administrator a finer control on his/her Linux box.
But sometimes you may feel ,you don’t need SELinux’s additional security to your system and you may want to disable it temporarily or for permanent.So we can have a look at how to disable selinux in both ways
SELinux mainly works in three modes
- Enforcing – This is real active mode where all operations and strictly monitored and will deny unauthorized access.
- Permissive - In this mode SELinux kernel switch into a mode where every operation is allowed.Operations that would be denied are allowed and a message is logged identifying that this particular operation would be denied.
- Disabled- In this mode,SELinux is completly disabled in kernel .And it allows all operations and no more logging for conflict.
we have different ways to disable SELinux.
Disabling temporarily
- #setenforce 0
This will put SELinux into permissive mode until the next reboot.After reboot SELinux will comeback to enforcing mode.
Disabling permanently
Change SELINUX=disabled in selinux configuratiion file /etc/selinux/config
But here you need to reboot your server to reflect this changes.
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targetedIf you don’t want to reboot your server and wait for few minutes,then you can make use of a Linux utility system-config-securitylevel.
- system-config-securitylevel (From graphical terminal)
- system-config-securitylevel-tui (From Command mode)
Disable and apply your settings.This will effect immediately and you can save your time.
Incoming search terms:
- authentication icon (8)
- username icon (4)
- change password icon (3)
- SELinux on this host is disabled (3)
- username password icon (2)
- username and password icon (2)
- passwords icon (2)
- image for password icon (2)
- icon remove security (1)
- configuration icon (1)
Related posts:
Leave a Reply 223 views, 1 so far
today |












Pingback: » Blog Archive Brief history of SELinux - Lynuxstuff.com