Which command is used to run a new shell for a user in a new context under SELinux?

su

runuser

newrole

The command used to run a new shell for a user in a new context under SELinux is "newrole." This command is specifically designed for situations where users need to execute commands or start sessions with a different SELinux role than their current one. In the SELinux framework, roles define what actions a user can perform, and the "newrole" command facilitates the transition from one role to another while maintaining the security policies enforced by SELinux.

When a user executes "newrole," they may be prompted to enter their password to confirm their identity and permission to switch roles. This feature is essential in scenarios where users are granted different access levels depending on their roles, ensuring minimal privilege required is maintained for security purposes.

Other commands, while they have their uses, do not focus specifically on changing the SELinux context. For instance, "su" is primarily used to switch users and can change the user ID but does not inherently manage SELinux roles. Similarly, "runuser" allows executing commands as another user but operates outside the SELinux role management context. "setenforce" is strictly related to changing the SELinux mode (between enforcing and permissive) and does not pertain to user role management directly. Thus, "newrole

setenforce

Want more questions?

All options are one-time payments.

$12.99

30 day pass for new members

All the basics to get you started

  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 30 day premium pass access
$29.99 $92.93 usd

6 month DELUXE pass (most popular)

Everything with the 30 day premium pass FOR 6 MONTHS! & the ultimate digital PDF study guide (BONUS)

  • Everything included in the premium pass
  • $92.93 usd value for $29.99! You save $62.94!
  • + Access to the ultimate digital PDF study guide
  • + 6 months of premium pass access
  • + Priority support
$14.99 $19.99

Ultimate digital PDF study guide

For those that prefer a more traditional form of learning

  • Available for instant download
  • Available offline
  • Hundreds of practice multiple choice questions
  • Comprehensive content
  • Detailed explanations
Image Description
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy