Removing advertising from Ubuntu Server motd

Ubuntu is a good product, mainly because it’s free.  They recently started some service called Landscape that lets you graph your server activity or something – I don’t really care as I don’t have hundreds of machines running Ubuntu Server (nor do about 99% of their users).  I got tired of seeing this when logging in over ssh:

Linux joint 2.6.32-309-ec2 #18-Ubuntu SMP Mon Oct 18 21:00:50 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04.3 LTS

Welcome to Ubuntu!
 * Documentation:  https://help.ubuntu.com/

  System information as of Fri Nov 25 06:08:51 UTC 2011

  System load:  0.0                Processes:           79
  Usage of /:   16.1% of 14.76GB   Users logged in:     0
  Memory usage: 11%                IP address for eth0: 10.0.0.1
  Swap usage:   0%

  Graph this data and manage this system at https://landscape.canonical.com/
---------------------------------------------------------------------
At the moment, only the core of the system is installed. To tune the
system to your needs, you can choose to install one or more
predefined collections of software by running the following
command:                                                             

   sudo tasksel --section server
---------------------------------------------------------------------

No mail.

I mean, jeez, that’s some text to print on login!  I found out it’s all controlled with this script and directory in /etc/update-motd.d.  There’s a bunch of scripts in there that run in order using normal SYSV startup script logic.  If you do the following, it produces a much nicer message:

sudo rm 51_update-motd 
sudo vi 50-landscape-sysinfoz
  # Change this line:
      /usr/bin/landscape-sysinfo 
  # to this line
      /usr/bin/landscape-sysinfo | head -n -2
sudo rm 10-help-text

Now, it should look more like this when you log in:

Linux joint 2.6.32-309-ec2 #18-Ubuntu SMP Mon Oct 18 21:00:50 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04.3 LTS

  System information as of Fri Nov 25 06:26:45 UTC 2011

  System load:  0.01               Processes:           85
  Usage of /:   16.1% of 14.76GB   Users logged in:     0
  Memory usage: 15%                IP address for eth0: 10.0.0.1
  Swap usage:   0%

No mail.

Much more manageable!


2 thoughts on “Removing advertising from Ubuntu Server motd

  1. Krzysztof

    Another modifcation (without truncating response)
    in
    50-landscape-sysinfoz
    change:
    /usr/bin/landscape-sysinfo
    to:
    /usr/bin/landscape-sysinfo --exclude-sysinfo-plugins=LandscapeLink

Leave a Reply

Your email address will not be published. Required fields are marked *