Copyright (c) 2016 Wind River Systems, Inc. SPDX-License-Identifier: Apache-2.0 -------------------------------------------------------------------- Titanium Cloud Customization of Login Banner Files --------------------------------------------------- This feature permits the customization of prelogin message (issue) and postlogin message of the day (motd) across the entire Titanium Cloud cluster. It is a convenience feature that simplifies propagation of the customized files. Introduction ------------ See also 'man issue' and 'man motd'. The following files can be customized, and are treated by this feature: /etc/issue (login banner, console) /etc/issue.net (login banner, ssh) /etc/motd.head (message of the day, header) /etc/motd.tail (message of the day, footer) The following files are not customizable, because each is generated by software: /etc/motd /etc/sysinv/motd.system /etc/platform/motd.license issue and issue.net are free standing files, while /etc/motd is generated from the following sources, in the following order: /etc/motd.head /etc/sysinv/motd.system /etc/platform/motd.license /etc/motd.tail The customization procedure during Titanium Cloud Installation and Commissioning is summarized as follows: 1) provide customization files 2) run 'config_controller' The customization procedure after config_controller is summarized as follows: 3) provide customization files 4) run 'apply_banner_customization' 5) lock/unlock each node Example tarball --------------- sample_banner.tgz has been provided (adjacent to this README). Extract the tarball on the active controller to the directory /opt/banner, or as indicated in the following sections. The tarball contains examples of the four customizable login banner files. Procedure prior to config_controller ------------------------------------ When setting up a new cluster, immediately after the first controller boots and before running config_controller: 1) Provide customization files To customize any of the four customizable banner files listed above, provide the new files in the following location: /opt/banner/issue /opt/banner/issue.net /opt/banner/motd.head /opt/banner/motd.tail I.e., sudo mkdir -p /opt/banner sudo tar xf sample_banner.tgz -C /opt/banner Each file is customized individually; Edit or remove these files in /opt/banner according to requirements. 2) Run config_controller When config_controller is run these files are moved from /opt/banner 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: In the event that an error is reported for the banner customization, customization can be repeated after config_controller using the following 'Procedure after deployment'; errors for customization do not impact config_controller. Procedure after deployment -------------------------- Customization can be performed any time after deployment: 1) Login to the active controller 2) Switch to root user, i.e., 'sudo bash' 3) Provide any of the customized banner files in /opt/banner, or another directory: /opt/banner/issue /opt/banner/issue.net /opt/banner/motd.head /opt/banner/motd.tail 4) Apply the customization, execute: 'apply_banner_customization /opt/banner', or 'apply_banner_customization ' The default path, if no parameter is specified, is the current working directory, i.e., 'apply_banner_customization $(pwd)' The banners are applied to configuration and installed on the current node, active controller. 5) Lock and unlock other nodes in the cluster, either from the CLI or the GUI, to install the customization on each node. Lock and unlock can coincide with horizon branding procedure; see also adjacent ../horizon/README for horizon branding. All subsequent newly added nodes will automatically get the banner customization. Manual Restoration ------------------ Replaced versions of banner files can be retrieved at the user's discretion from each node in the cluster, from the directory: /opt/banner.bk A maximum of 10 versions of each file are maintained, with the oldest versions replaced only when the count reaches 10.