How to configure the login message in Ubuntu?

This login message is created by Ubuntu's landscape packages. Speaking personally, I think they're quite annoying and as such, have configured ansible to nuke those packages and set a blank login message.

To do that:

$ apt-get remove landscape-client landscape-common 
$ rm -f /etc/motd && touch /etc/motd

That will create a blank /etc/motd. To set a custom login message, edit that file as desired.


In my case, I had to clear /etc/update-motd.d/51-cloudguest, which read:

#!/bin/sh
#
# This file is written by the Ubuntu image build process, it is not
# managed by a package.  If you want to avoid seeing this advertisement,
# then you can safely remove the file.
echo ""
echo "  Get cloud support with Ubuntu Advantage Cloud Guest:"
echo "    http://www.ubuntu.com/business/services/cloud"
echo ""
echo "  Use Juju to deploy your cloud instances and workloads:"
echo "    https://juju.ubuntu.com/#cloud-saucy"