Redhat login banner

Posted: August 17, 2010 in Redhat

You must be wondering how to change the system login banner. It is a very simple task. You login banner is stored in /etc/issue file. It is a text file which contains a message or system identification to be printed before the login prompt. Just open file in vi text editor:
# vi /etc/issue

Add/modify text as per your needs. In your /etc/issue file you can include certain escape codes to display the system name, date and time etc. All escape codes consist of a backslash (\) immediately followed
by one of the letters explained below:

  • d : Insert the current date.
  • s : Insert the system name, the name of the operating system.
  • l : Insert the name of the current tty line.
  • m : Insert the architecture identifier of the machine, eg. i486
  • n :Insert the nodename of the machine, also known as the hostname.
  • o :Insert the domainname of the machine.
  • r : Insert the release number of the OS, eg. 1.1.9.
  • t :Insert the current time.
  • u : Insert the number of current users logged in.
  • U : Insert the string “N user(s)” or “N users” where N is the number of current users logged in
  • v : Insert the version of the OS, eg. the build‐date etc.

An example of /etc/issue file with escape codes:

1) Open /etc/issue file
# vi /etc/issue

2) Append/edit/add following text to file:
This is \n.\o (\s \m \r) \t

3) Save file and exit to shell prompt.

My baaner printed before the login prompt as follows:

This is server.nixcraft.in (Linux i686 2.6.13-web100) 20:01:30

server login:

Please note that other Linux distrobution such as Debian also support /etc/issue file, so you can edit it to display login banner.

Ref : http://theos.in/hakuna-matata/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s