nerdexam
CompTIA

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 i

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.

Security

Question

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 into permissive mode?

Options

  • Asetenforce 0
  • B/etc/init.d/selinux stop
  • Cselinux passive
  • D/etc/init.d/selinux startpassive

How the community answered

(51 responses)
  • A
    92% (47)
  • B
    4% (2)
  • C
    2% (1)
  • D
    2% (1)

Why each option

To switch SELinux into permissive mode on a running Linux system for auditing, the command `setenforce 0` is used.

Asetenforce 0Correct

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.

B/etc/init.d/selinux stop

`/etc/init.d/selinux stop` would completely disable SELinux, which is different from permissive mode and would prevent the auditing of policy violations.

Cselinux passive

`selinux passive` is not a valid or recognized command for changing SELinux mode on a Linux system; the correct utility is `setenforce`.

D/etc/init.d/selinux startpassive

`/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

#SELinux#permissive mode#setenforce command#security hardening

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice