Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


selinux_list_contexts

This is an old revision of the document!


CentOS 7 - List SELinux contexts

  • First, install setools:
    yum install setools
  • List all types:
    seinfo -t
  • List all users:
    seinfo -u
  • List all roles:
    seinfo -r
  • List all booleans:
    seinfo -r
  • Help:
    seinfo --help

Example

You want to add a CIFS share and set the correct SELinux context on the shared directory and below.

  • Find the samba type:
    seinfo -t |grep samba
       samba_secrets_t
       samba_spool_t
       samba_unconfined_script_exec_t
       samba_net_t
       samba_var_t
       samba_net_exec_t
       samba_net_tmp_t
       samba_unconfined_net_t
       samba_unconfined_script_t
       samba_unit_file_t
       sambagui_exec_t
       samba_share_t
       samba_initrc_exec_t
       sambagui_t
       samba_etc_t
       samba_log_t
selinux_list_contexts.1463311867.txt.gz · Last modified: 2016/05/15 11:31 by admin