View SELinx Modifications and Copy Automation Script

Cockpit administrators can view SELinux system modifications made to the local system using the SELinux page in the web console. If required, Cockpit administrators can also use the Automation Script link on the SELinux page to copy the same settings to other hosts.

What Do You Need?

  • The Cockpit web console must be installed and accessible.

    For details, see these topics: Install and Enable Cockpit and Log in to the Cockpit Web Console.

  • The policycoreutils-python-utils package must be installed to transfer SELinux configuration settings to other Oracle Linux hosts.
  • Administrator privileges.

Steps

Using the Cockpit web console, follow these steps to view the SELinux policy modifications that were applied to the local host, and optionally, to apply the same settings to other hosts.

  1. In the Cockpit navigation pane, click SELinux.

    The SELinux page appears.

  2. In the SELinux page, perform any of the following:
    • To view the SELinux policy modifications, navigate to the System Modifications section. The SELinux policy modifications applied to the host appear in a table format.
    • To apply the same SELinux policy settings to other hosts, perform these steps:
      1. Click View Automation Script. The Automated Script dialog appears.
      2. To copy the automation settings, click Copy to clipboard.
      3. To copy and import the configuration settings to other hosts, use the command line. For example, the syntax you use to copy and import the configuration settings might look similar to:
        scp ./my-selinux-settings new-system-hostname:
        new-system-hostname$ sudo semanage import -f ./my-selinux-settings
        For more details, see the scp (secure copy) command line utility and the semanage-import(8) manual page.