Change Linux Login banner

Written by A.Jesin Friday, 29 April 2011 09:41

Banner screens provide a lot of important and warm welcome messages, but they also expose the system to a number of threats by displaying the exact version number. In Linux by default after your system starts when you come to the terminal you may see a screen like this

Linux Login Banner

The default banner in Linux displays the OS name and version number

You can customize this banner according to your liking to add a personalized message or to make it more informative.

The banner message is located in the file /etc/issue before editing it, it is always wise to take a backup

cp /etc/issue{,.bak}

will make a copy of the file with the name issue.bak. Open the file and edit it to your heart’s content. Some of the switches are specified here

\r - Displays the kernel's version e.g. 2.6.32-71.el6.i686
\m - Displays the machine's hardware name e.g. i686
\d - Displays the current system date in YYYY-MM-DD format e.g. 2011-04-29
\t - Displays the current system time e.g 21:45:30
\n - Displays the hostname of the system
\l - Displays the current terminal number e.g. tty2

I’ve done some tweaking to my Linux login banner take a look at it.

Linux Modified Banner

The Linux login banner now displays the date time and hostname

Also read:

Enjoyed reading this article, subscribe to stay up-to-date with more such articles

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>