Hoe controleer ik de SELinux operationele modus

De eenvoudigste manier om de SELinux ( Security Enhanced Linux ) operationele modus te controleren, is door het getenforce commando te gebruiken. Dit commando drukt zonder opties of argumenten de huidige status van de SELinux operationele modus af.

# getenforce Permissive

Daarnaast kan de huidige status van de SELinux operationele modus permanent of tijdelijk worden ingesteld. Het bovenstaande getenforce commando toont alleen de huidige status, maar om te zien of de status tijdelijk is ingesteld door setenforce of door SELinux configuratiebestand cat /etc/selinux/config, moet het sestatus commando worden gebruikt.

# sestatus SELinux status: enabledSELinuxfs mount: /sys/fs/selinuxSELinux root directory: /etc/selinuxLoaded policy name: targetedCurrent mode: permissiveMode from config file: enforcingPolicy MLS status: enabledPolicy deny_unknown status: allowedMax kernel policy version: 29

In de uitvoer van het bovenstaande sestatus commando kunnen we zien dat de huidige SELinux operationele modus meer is toegestaan, terwijl de afdwingende modus is ingesteld door configuratiebestand dat van kracht wordt na reboot.

Geef een antwoord

Het e-mailadres wordt niet gepubliceerd.