Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
Wat het doet
sestatus prints whether SELinux is enabled, the loaded policy (targeted on RHEL), the current mode and the mode in the config file. With -b it lists all booleans; with -v it shows the contexts of the files and processes named in /etc/sestatus.conf.
Zo schrijf je het
sestatus [-v] [-b]Opties 2
Meest gebruikt
Niets past bij dit filter.
Voorbeelden 10
$ als gewone gebruiker# als root (of met sudo)
1Full status
sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcingCurrent and config mode should both be enforcing.
2Mode mismatch
sestatus | grep -i modeCurrent permissive but config enforcing = someone ran setenforce 0.
3With booleans
sestatus -b | grep httpdState of the httpd booleans.
4Contexts of important files and processes
sestatus -vShows labels of /etc/passwd, /bin/bash, init and others.
5Check the policy type
sestatus | grep 'Loaded policy'targeted = only selected services are confined (RHEL default).
6Policy version
sestatus | grep 'Max kernel policy version'For support cases.
7In a compliance script (security)
sestatus | awk -F: '/Current mode/ {gsub(/ /,"",$2); print $2}' enforcingClean value for a report.
8Is MLS used?
sestatus | grep -i mlsPolicy MLS status: enabled (also in targeted, for MCS labels).
9After disabling, nothing is shown
sestatus SELinux status: disabledComing back needs a relabel.
10Deny unknown classes
sestatus | grep -i deny_unknownHow the kernel handles unknown permissions.
Niets past bij dit filter.
Exitcodes
0 | Done. |
1 | Error. |