Brand the Login Banner During Commissioning

You can customize the pre-login message (issue) and post-login MOTD across the entire StarlingX cluster during system commissioning and installation.

The following Linux files controlling pre-login (issue) and post-login (motd) messaging can be customized with the procedure below.

/etc/issue

console login banner

/etc/issue.net

ssh login banner

/etc/motd.head

message of the day header

/etc/motd.tail

message of the day footer

This file is not present by default. You must first create it to apply your customizations.

issue and issue.net are free-standing files. /etc/motd is generated from the following sources in the order presented:

  1. /etc/motd.head

  2. /etc/sysinv/motd.system

  3. /etc/platform/motd.license

  4. /etc/motd.tail

Complete the following procedure to customize the login banner during installation and commissioning:

Procedure

  1. Define customized banners. To configure the issue and MOTD messages, there are two available options:

    • Define banner variable in the Ansible Overrides file for the Bootstrap Playbook ($HOME/localhost.yml)

      It is possible to configure the issue and MOTD messages by defining the “banner” variable in the ansible-override YAML file. Messages should be formatted as multiline string entries. For each category, it is possible to define either one or both parameters, or leave them undefined. If parameters are left undefined, default values will be applied for each message.

      banner: {}
      
      e.g.
      banner:
         issue:
            network: |
               ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
               ::::::::::::::::::::: EXAMPLE SSH WELCOME MESSAGE ::::::::::::::::::::
               ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
            console: |
               :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
               ::::::::::::::::::: EXAMPLE CONSOLE WELCOME MESSAGE ::::::::::::::::::
               :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
         motd:
            head: |
               -----------------------------------------------------------------------------------------------
               ---------------------- EXAMPLE MOTD HEAD MESSAGE ---------------------
               -----------------------------------------------------------------------------------------------
            tail: |
               ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
               ++++++++++++++++++++++ EXAMPLE MOTD TAIL MESSAGE +++++++++++++++++++++
               ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      
    • Provide customization files.

      Alternatively, to customize any of the four customizable banner files listed above, it is possible to provide the new files directly in the following locations:

      • /opt/banner/issue

      • /opt/banner/issue.net

      • /opt/banner/motd.head

      • /opt/banner/motd.tail

    See the issue and motd man pages for details on file syntax.

  2. Run the Ansible Bootstrap playbook.

    When the Ansible Bootstrap playbook is run, either the messages defined in the Ansible Overrides or the files specified in /opt/banner are moved to configuration storage and are applied to the controller node as it is initialized. All nodes in the cluster which are subsequently configured will retrieve these custom banners as well.

    Note

    To update the pre-login message (issue) or the post-login MOTD after the system has been installed and commissioned, see Brand the Login Banner on a Commissioned System for more information.