What is the equivalent to motd.tail in 11.04?

motd.tail is deprecated according to this bug report:

motd(5) says: "The contents of this file are regenerated upon every system
boot based on the contents of /etc/motd.tail." This is not true anymore, as
Ubuntu uses the update-motd framework. Any reference to motd.tail should be
replaced with a reference to the update-motd framework or update-motd(5).
The manpage for motd.tail should be removed.

I'm using it to identify my servers when I log in and make sure I'm on the right machine, so I don't need anything dynamic, just a simple message.

What is the equivalent to motd.tail (appending a small message to the end of the MOTD) that works with Ubuntu 11.04?


To answer the question directly, just edit /etc/update-motd.d/99-footer.

The /etc/update-motd.d/ is a fairly standard config-dump that is ordered by filename. 99-footer is the last thing in there so that gets bolted on last. In Natty by default this just checks to see if there's a file called /etc/motd.tail and if there is, it appends that to the motd:

[ -f /etc/motd.tail ] && cat /etc/motd.tail || true

So you do have two choices. You can either add some more logic in there to just echo some output (this is a shell script, not a textfile after all) or you can create (or edit if you already have one) /etc/motd.tail. Either way is perfectly valid.


According to the Ubuntu Server Guide, pam_motd executes the scripts in /etc/update-motd.d in numerical order.
The output of the scripts is written to /var/run/motd, keeping the numerical order, then concatenated with /etc/motd.tail.

More information can be found here.