Thursday, May 24, 2012

Linux: Disable SELINUX

Introduction

SELINUX may cause some confusion and difficulties when configuring Linux. If any weird problems encounter while configure any of the Linux services (e.g.: Samba, Firewall, ...), we may disable the SELINUX first to check if the problems are related to it.

Fedora 16

In Fedora 16, selinux no longer mount to /selinux.  It has move to /sys/fs/selinux.

  1. Temporary disable SELINUX: echo 0 >/sys/fs/selinux/enforce
  2. Temporary enable SELINUX: echo 1 >/sys/fs/selinux/enforce
  3. Permanently disable SELINUX: edit /etc/selinux/config and change "SELINUX=enforcing" to "SELINUX=disabled"

Fedora 15 or below

  1. Temporary disable SELINUX: echo 0 >/selinux/enforce
  2. Temporary enable SELINUX: echo 1 >/selinux/enforce
  3. Permanently disable SELINUX: edit /etc/selinux/config and change "SELINUX=enforcing" to "SELINUX=disabled"
Reference: How to Disable SELinux

No comments: