Este contenido no está disponible en el idioma seleccionado.

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

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.