Skip to main content

Create a banner

Contributors netapp-thomi

You can create a banner to display a message to someone who attempts to access the cluster or SVM. The banner is displayed in a console session (for cluster access only) or an SSH session (for cluster or SVM access) before a user is prompted for authentication.

Steps
  1. Use the security login banner modify command to create a banner for the cluster or SVM:

    If you want to…​ Then…​

    Specify a message that is a single line

    Use the -message "text" parameter to specify the text.

    Include newlines (also known as end of lines) in the message

    Use the command without the -message or -uri parameter to launch the interactive mode for editing the banner.

    Upload content from a location to use for the banner

    Use the -uri parameter to specify the content's FTP or HTTP location.

    The maximum size for a banner is 2,048 bytes, including newlines.

    A banner created by using the -uri parameter is static. It is not automatically refreshed to reflect subsequent changes of the source content.

    The banner created for the cluster is displayed also for all SVMs that do not have an existing banner. Any subsequently created banner for an SVM overrides the cluster-level banner for that SVM. Specifying the -message parameter with a hyphen within double quotes ("-") for the SVM resets the SVM to use the cluster-level banner.

  2. Verify that the banner has been created by displaying it with the security login banner show command.

    Specifying the -message parameter with an empty string ("") displays banners that have no content.

    Specifying the -message parameter with "-" displays all (admin or data) SVMs that do not have a banner configured.

Examples of creating banners

The following example uses the noninteractive mode to create a banner for the “cluster1” cluster:

cluster1::> security login banner modify -message "Authorized users only!"

cluster1::>

The following example uses the interactive mode to create a banner for the "`svm1`"SVM:

cluster1::> security login banner modify -vserver svm1

Enter the message of the day for Vserver "svm1".
Max size: 2048. Enter a blank line to terminate input. Press Ctrl-C to abort.
0        1         2         3         4         5         6         7         8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
The svm1 SVM is reserved for authorized users only!


cluster1::>

The following example displays the banners that have been created:

cluster1::> security login banner show
Vserver: cluster1
Message
-----------------------------------------------------------------------------
Authorized users only!

Vserver: svm1
Message
-----------------------------------------------------------------------------
The svm1 SVM is reserved for authorized users only!

2 entries were displayed.

cluster1::>
Related information

Managing the banner