RHEL7: How to deploy SELinux man pages.

Share this link

By default, a lot of SELinux man pages are not available.
To get them, follow these steps.

Install the selinux-policy-devel package:

# yum install -y selinux-policy-devel

Note: I find the selinux-policy-devel package name easier to remember than the policycoreutils-devel name but both give the same result.

Update the man pages database:

# mandb

Display the list of the new available SELinux man pages:

# apropos _selinux

Source: Sander van Vugt’s SELinux SELinux video (15min).

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...
8 comments on “RHEL7: How to deploy SELinux man pages.
  1. jacques says:

    Just a little comment, you can skip this “sepolicy manpage” command, just run the mandb after the yum install and it is done.

    • CertDepot says:

      Yes, you are perfectly right. This is a great contribution!
      Thanks a lot.

    • PickledEggs says:

      It doesn’t seem to work for me, if I don’t run the sepolicy manpage command after installing mandb doesn’t add the manpages. At least not on: Linux myserver1 3.10.0-514.6.1.el7.x86_64 #1 SMP Wed Jan 18 13:06:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

      • kenrin says:

        After you install the package and before running mandb you need to run “sepolicy manpage -a -p /usr/share/man/man8”

        • Sultan says:

          On the latest update, there is probably a bug and “sepolicy manpage -a -p /usr/share/man/man8” gives following error.

          [root@server1 home]# sepolicy manpage -a -p /usr/share/man/man8
          IOError: [Errno 2] No such file or directory: ‘//etc/selinux/targeted/contexts/files/file_contexts.local’

          This error can easily be avoided by touching the missing file and run the same command again to generate manpages.

          [root@server1 home]# touch /etc/selinux/targeted/contexts/files/file_contexts.local
          [root@server1 home]# sepolicy manpage -a -p /usr/share/man/man8
          /usr/share/man/man8/NetworkManager_selinux.8
          /usr/share/man/man8/abrt_selinux.8
          /usr/share/man/man8/abrt_dump_oops_selinux.8
          /usr/share/man/man8/abrt_handle_event_selinux.8
          /usr/share/man/man8/abrt_helper_selinux.8

          /usr/share/man/man8/zoneminder_selinux.8
          /usr/share/man/man8/zoneminder_script_selinux.8
          /usr/share/man/man8/zos_remote_selinux.8
          [root@server1 home]# mandb
          Purging old database entries in /usr/share/man…
          Processing manual pages under /usr/share/man…
          Updating index cache for path `/usr/share/man/man8′. Wait…done.
          Checking for stray cats under /usr/share/man…
          Checking for stray cats under /var/cache/man…

          Purging old database entries in /usr/local/share/man…
          Processing manual pages under /usr/local/share/man…
          1 man subdirectory contained newer manual pages.
          840 manual pages were added.
          0 stray cats were added.
          0 old database entries were purged.

    • Gjorgi says:

      Something may have changed in these 2 years since your comment, the only thing you’d get now if you skip on sepolicy manpage command is a PAM- related SELinux Boolean.

  2. Gjorgi says:

    Right after executing sepolicy manpage -a -p command, you need to update the manpages again:
    mandb
    and then it will work.

Leave a Reply

Upcoming Events (Local Time)

There are no events.

RHCSA7: Task of the day

Allowed time: 10 minutes.
Archive and compress the content of the /opt directory (create files if none exists).
Uncompress and unarchive the resulting file in /root

RHCE7: Task of the day

Allowed time: 10 minutes.
Configure a httpd server that executes a Perl script in the /var/www/cgi-bin directory displaying "Hello!".

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...