Ubuntu Server - changing motd (aka the log-on banner)

20 Nov 2009

Call it a "MOTD" call it a "log-on banner", when you first log on to a Ubuntu server, you get some thing like this:

$ ssh nickg@10.0.1.19
nickg@10.0.1.19's password: 
Linux ubuntu910beta 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/

  System information as of Fri Nov 13 20:57:46 EST 2009

  System load: 0.16              Memory usage: 54%   Processes:       74
  Usage of /:  20.2% of 7.23GB   Swap usage:   0%    Users logged in: 1

  Graph this data and manage this system at https://landscape.canonical.com/

0 packages can be updated.
0 updates are security updates.

Last login: Fri Nov 13 20:47:42 2009 from localhost

Blah what a mess.

All this crap comes from the update-motd package. Looking in the /etc/update-motd.d directory you'll see various bash scripts to generate parts of the output.

Personally, I would remove 50-landscape-sysinfo, 90-updates-available, 91-release_update. This will make log-in much faster. Keeping the 99-reboot-required is your call. It's a fast check, but really should be handled by your monitoring system.

00-header does two things: print the system/kernel version (via uname) and cat out /etc/motd.tail if it exists. I get rid of the call to uname and replace /etc/motd.tail to be something useful.

Fun!