How to enable SELinux?



  • Change SELINUX=disabled to SELINUX=permissive in /etc/sysconfig/selinux

    # vi /etc/sysconfig/selinux
    SELINUX=permissive
    

    Reboot your system:

    # /sbin/reboot
    

    Check that SELinux is enabled:

    # /usr/sbin/sestatus -v
    SELinux status:                 enabled
    SELinuxfs mount:                /selinux
    Current mode:                   permissive
    Mode from config file:          permissive
    Policy version:                 21
    Policy from config file:        targeted
    
    Process contexts:
    Current context:                root:system_r:unconfined_t:SystemLow-SystemHigh
    Init context:                   system_u:system_r:init_t
    /sbin/mingetty                  system_u:system_r:getty_t
    /usr/sbin/sshd                  system_u:system_r:unconfined_t:SystemLow-SystemHigh
    
    File contexts:
    Controlling term:               root:object_r:devpts_t
    /etc/passwd                     system_u:object_r:etc_t
    /etc/shadow                     system_u:object_r:shadow_t
    /bin/bash                       system_u:object_r:shell_exec_t
    /bin/login                      system_u:object_r:login_exec_t
    /bin/sh                         system_u:object_r:bin_t -> system_u:object_r:shell_exec_t
    /sbin/agetty                    system_u:object_r:getty_exec_t
    /sbin/init                      system_u:object_r:init_exec_t
    /sbin/mingetty                  system_u:object_r:getty_exec_t
    /usr/sbin/sshd                  system_u:object_r:sshd_exec_t
    /lib/libc.so.6                  system_u:object_r:lib_t -> system_u:object_r:lib_t
    /lib/ld-linux.so.2              system_u:object_r:lib_t -> system_u:object_r:ld_so_t
    

Log in to reply
 

© Lightnetics 2024