此内容没有您所选择的语言版本。

21.2.3. SELinux Utilities


The following are some of the most commonly used SELinux utilities:
  • /usr/bin/setenforce — Modifies in real-time the mode SELinux is running. By executing setenforce 1, SELinux is put in enforcing mode. By executing setenforce 0, SELinux is put in permissive mode. To actually disable SELinux, you need to either set the parameter in /etc/sysconfig/selinux or pass the parameter selinux=0 to the kernel, either in /etc/grub.conf or at boot time.
  • /usr/bin/sestatus -v — Gets the detailed status of a system running SELinux. The following example shows an excerpt of sestatus output:
    SELinux status:         enabled
    SELinuxfs mount:        /selinux
    Current mode:           enforcing
    Policy version:         18
    
  • /usr/bin/newrole — Runs a new shell in a new context, or role. Policy must allow the transition to the new role.
  • /sbin/restorecon — Sets the security context of one or more files by marking the extended attributes with the appropriate file or security context.
  • /sbin/fixfiles — Checks or corrects the security context database on the file system.
Refer to the man page associated with these utilities for more information.
For more information on all binary utilities available, refer to the setools or policycoreutils package contents by running rpm -ql <package-name>, where <package-name> is the name of the specific package.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.