Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

Network Change & Configuration Management

Reply
Highlighted
Accepted Solution

Create a script for a login banner for cisco switches

Authority
Posts: 15
3051     1

howdy, 

 NOOB here, i am trying in vain to create a script in NetMRI that will write a login/motd banner on my vast amount of cisco switches. 

 i know this is not a new topic but any help would be appreciated. please speak in small words, im a noob after all.

Highlighted

Re: Create a script for a login banner for cisco switches

Adviser
Posts: 417
3051     1

Check this out, problem is the Carriage return you have to pass it in as one line as we did in a variable with "\r"

 

Script-Filter:
$Vendor eq "Cisco"


##############
Action:
Fix Banners

Action-Description:
Remove the old banner statement and add a new one.    

Action-Commands:
SET:$banner = "#########################################################################\r#     This system is for the use of authorized users only.              #\r#     Individuals using this computer system without authority, or in   #\r#     excess of their authority, are subject to having all of their     #\r#     activities on this system monitored and recorded by system        #\r#     personnel.                                                        #\r#                                                                       #\r#     In the course of monitoring individuals improperly using this     #\r#     system, or in the course of system maintenance, the activities    #\r#     of authorized users may also be monitored.                        #\r#                                                                       #\r#     Anyone using this system expressly consents to such monitoring    #\r#     and is advised that if such monitoring reveals possible           #\r#     evidence of criminal activity, system personnel may provide the   #\r#     evidence of such monitoring to law enforcement officials.         #\r#########################################################################\r"

config t
no banner motd
banner motd ^\r$banner\r^\r
end
write mem
Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh
Showing results for 
Search instead for 
Do you mean 

Recommended for You