Cockpit Login Banner

Administrators can choose to communicate changes to host users by displaying a banner message on the Cockpit Login page. Typically, a banner message is useful for enforcing a security policy or to inform users of scheduled maintenance events.

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.

  • An existing cockpit.conf file must be saved in the /etc/cockpit/ directory.

    Important:

    The Cockpit configuration file (cockpit.conf) isn't a system required file. In cases where the file doesn't already exist, the file must be manually created before performing the steps in this procedure. For more details about the use of this file, see the cockpit.conf(5) manual page.
  • Administrator privileges.

Steps

Using the command line, perform the following steps to add a prelogin banner message to the Cockpit configuration file.

  1. Specify the text for the banner message in the issues.cockpit file, for example:
    1. Open or create the /etc/issue.cockpit file in a text editor.
    2. In the issue.cockpit file you can edit or add the content you want to display as a prelogin banner message.

      Don't include any macros in this file as no reformatting is handled between the file content and the displayed content. Use line breaks and indentation to format the banner content. You can also use ASCII art.

    3. Save the file.
  2. If you haven't done so already, add the banner file properties to the Cockpit configuration file as follows:
    1. Open the cockpit.conf file in the /etc/cockpit/ directory. For example:
      sudo vi cockpit.conf
    2. In the cockpit.conf file, add the following information:
      [Session]
      Banner=/etc/issue.cockpit
    3. Save the file.
  3. Restart Cockpit for the configuration file changes to take effect.
    sudo systemctl try-restart cockpit