0

Is it possible to have the MOTD Banner set from an external source while maintaining a hard coded value (if present)? Possibly like a TFTP server?

Only way I have ever seen this done is via it being explicitly set through the command line.

EDIT: Just to add clarification. I'm wanting the actual message that is shown on the screen to be populated from an external source. I'm not wondering how to set a message to only show when someone is logging in externally. So for example can the exec message reference a file on a tftp server and use that file to display it's message.

Jared
  • 281
  • 2
  • 4
  • 11

1 Answers1

1

You can setup "banner exec" for external connections, it runs once incoming connection is made to a vty.

banner exec d message d

You cannot have different MOTD Banner as it is global config for cisco devices.

Sorry for misunderstanding your question, so there is no way you can pull MOTD from external source. But what you could do, now thinking about it is create a script which logins and changes it using expect script or something. Hope this helps.

P.S. Apparently you need to make sure you are constructing the script such way that you aren't munging stuff, making sure you're escape char isn't contained in the motd you want, etc. And also obviously you would want to set the permissions for that user so they can only set motd( using aaa) using aaa

Danila Ladner
  • 5,331
  • 22
  • 31
  • I think you may have misunderstood the request. I'm wanting to set the message that is displayed from an external source. Not set the message that appears when a user logs in from an external source. – Jared May 03 '13 at 21:19
  • Oh? I see. What that external source would be? tftp? – Danila Ladner May 03 '13 at 21:22
  • Sure. As long as it's something that it could read securely and I'd just need to make sure that it doesn't open up any security issues. Don't know that it would matter TFTP or some other method. I'm guessing TFTP would be the easiest to use...just have a .text file (or something similar) that gets referenced. – Jared May 03 '13 at 21:24
  • No i do not think i know from the top of my head to have dynamic MOTD from some external source. Sorry. You might want to read on Cisco docs, but to best of my knowledge I did not hear anything like that. – Danila Ladner May 03 '13 at 21:25
  • I updated the answer, see if that something helpful for you. – Danila Ladner May 03 '13 at 21:32