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
Just a little comment, you can skip this “sepolicy manpage” command, just run the mandb after the yum install and it is done.
Yes, you are perfectly right. This is a great contribution!
Thanks a lot.
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
After you install the package and before running mandb you need to run “sepolicy manpage -a -p /usr/share/man/man8”
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.
Interesting. Thanks.
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.
Right after executing sepolicy manpage -a -p command, you need to update the manpages again:
mandb
and then it will work.