Search code examples
command-line-interfaceswitching

Display a message on Alcatel CLI before login


I would like to know if there is a way to show a message on the CLI when connecting to an Alcatel switch before it asks to enter login and password.

I'm doing that because I would like to set a custom ID for each switch and knowing the ID without having to log in.

(Another solution would be to replace the word login by the message I want to show)


Solution

  • The answer is given right here :

    https://www.manualslib.com/manual/207427/Alcatel-Lucent-Omniswitch-6850-48.html?page=83#manual

    Modifying the Text Display Before Login

    By default, the switch does not display any text before the login prompt for any CLI session.

    At initial bootup, the switch creates a pre_banner.txt file in the /flash/switch directory. The file is empty and may be edited to include text that you want to display before the login prompt.

    With the following result :

    Please supply your user name and password at the prompts.
    
    login : user123
    password :
    

    Old Answer

    I have found some information for you inside a manual of one switch: https://www.manualslib.com/manual/207427/Alcatel-Lucent-Omniswitch-6850-48.html?page=82

    The Login Banner feature allows you to change the banner that displays whenever someone logs into the switch. This feature can be used to display messages about user authorization and security

    Two steps are required to change the login banner. These steps are listed here:

    • Create a text file that contains the banner you want to display in the switch's /flash/switch directory.
    • Enable the text file by entering the session banner CLI command followed by the filename

    [omissis]

    If you want the login banner in the text file to apply to FTP switch sessions, execute the following CLI command where the text filename is firstbanner.txt.-> session banner ftp /flash/switch/firstbanner.txt

    If you want the login banner in the text file to apply to CLI switch sessions, execute the following CLI command where the text filename is secondbanner.txt.-> session banner cli /flash/switch/secondbanner.txt