LX0-104 · Question #206
SELinux has just been installed on a Linux system and the administrator wants to use SELinux in permissive mode in order to audit the various services on the system. What command will switch SELinux…
The correct answer is A. setenforce 0. To switch SELinux into permissive mode on a running Linux system for auditing, the command setenforce 0 is used.
Question
Options
- Asetenforce 0
- B/etc/init.d/selinux stop
- Cselinux passive
- D/etc/init.d/selinux startpassive
How the community answered
(51 responses)- A92% (47)
- B4% (2)
- C2% (1)
- D2% (1)
Why each option
To switch SELinux into permissive mode on a running Linux system for auditing, the command `setenforce 0` is used.
The `setenforce` command is used to dynamically change the enforcing status of SELinux. Specifically, `setenforce 0` puts SELinux into permissive mode, where it logs policy violations but does not block any actions, making it ideal for auditing.
`/etc/init.d/selinux stop` would completely disable SELinux, which is different from permissive mode and would prevent the auditing of policy violations.
`selinux passive` is not a valid or recognized command for changing SELinux mode on a Linux system; the correct utility is `setenforce`.
`/etc/init.d/selinux startpassive` is not a standard or recognized command to manage SELinux modes, as SELinux modes are controlled via `setenforce` or kernel boot parameters.
Concept tested: SELinux enforcing modes and commands
Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/using_selinux/changing-selinux-modes_using-selinux
Topics
Community Discussion
No community discussion yet for this question.