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 thecockpit.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.
- Specify the text for the banner message in the
issues.cockpit
file, for example:- Open or create the
/etc/issue.cockpit
file in a text editor. - 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.
- Save the file.
- Open or create the
- If you haven't done so already, add the banner file properties to the Cockpit
configuration file as follows:
- Open the
cockpit.conf
file in the/etc/cockpit/
directory. For example:sudo vi cockpit.conf
- In the
cockpit.conf
file, add the following information:[Session] Banner=/etc/issue.cockpit
- Save the file.
- Open the
- Restart Cockpit for the configuration file changes to take effect.
sudo systemctl try-restart cockpit