Sunday, December 23, 2012

Disable SElinux

How to disable SELinux
From  the Command Line  From the command line, you can edit the /etc/sysconfig/selinux file. This file is a symlink to /etc/selinux/config.  Change the value of SELINUX or SELINUXTYPE to disabled  Reboot the unit.

[root@host2a ~]# cat /etc/sysconfig/selinux
# 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=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0

Use the command below to check the status of SELINUX
From  the command line:  
# type :    sestatus
# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 21
Policy from config file:        targeted

Changes will take effect  after the reboot. Check once again if selinux status is diabled
From the terminal
#  sestatus
Selinux  diabled
This will determine if changes from selinux configuration took effect.
If not
From the command :
Type:  iptables –F ( Flush)
Service iptables  save
Note: Same procedure if you want to enable SElinux

No comments:

Post a Comment

SEO TOOLS

Check Page Rank of your Web site pages instantly:

This page rank checking tool is powered by Page Rank Checker service