I'm not sure if I remember when I installed red hat 5 on my server. So how I can be sure whether selinux is disabled or not?
I'm not sure if I remember when I installed red hat 5 on my server. So how I can be sure whether selinux is disabled or not?
Simply try
Note:
The clean way to determine if selinux is enabled or not would be to use the
selinuxenabled
tool fromlibselinux-utils
package. The issue is that your kernel could have selinux compiled and enforced, but (for various uncommon reasons) not have selinux-utils installed.This is a quite uncommon situation, but it resambles to yours :)
See Administrator Control of SELinux in the SELinux manual:
selinuxenabled;; echo $?
will display 0 if SELinux is enabled and -256 if it is disabled.
The standard interactive tool on RHEL is getenforce. It outputs a message telling the user which mode SELinux is in: enforcing, permissive or disabled.
In Red Hat systems, you could edit
/etc/selinux/config
and set:Reboot and you are golden.