15

I have this in my Ubuntu SSH Banner Message:

Welcome to Ubuntu 13.10 (GNU/Linux 3.4.43+ armv7l)

 * Documentation:  https://help.ubuntu.com/
No mail.
Last login: Mon Dec  2 08:25:39 2013

I'd like to have something like the standard Ubuntu Server:

Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Fri Sep 28 09:48:57 UTC 2012

  System load:  0.08              Processes:           20
  Usage of /:   12.4% of 57.97GB   Users logged in:     0
  Memory usage: 5%                IP address for eth0: 10.123.161.58
  Swap usage:   0%

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

31 packages can be updated.
20 updates are security updates.

Last login: Thu Sep 21 19:18:35 2012 from 122.181.4.42

How could I get this, please? Thanks in advance!

10

It looks like the /etc/update-motd.d directory can no longer have links to the scripts. (This happened to the Cronjob directories a number of release back, and is part of the security stuff I would guess).

If you list the directory (ls -l /etc/update-motd.d) you will see the following

50-landscape-sysinfo -> /usr/share/landscape/landscape-sysinfo.wrapper

If you want the System information back just copy the script into /etc/update-motd.d with the following command.

$ sudo cp /usr/share/landscape/landscape-sysinfo.wrapper /etc/update-motd.d/52-landscape-sysinfo

Note that when landscape fixes the problem you will get two copy of the script and then you can just delete the file.

8

The text displayed (Message of the Day, MOTD) is created by running in numerical order the scripts in /etc/update-motd.d and joining together the output. I'm not certain which package contains the difference between the server and desktop versions, but you should be able to edit those scripts, or add new ones to create whatever message you want.

4

You can output things manually by

sudo run-parts /etc/update-motd.d/

Normally the only way to update the file is by triggering pam_motd and on 'standard' ubuntu systems the services 'login' and 'sshd' do that.

Look at

grep pam_motd /etc/pam.d/*

if you want to know more. If you want to update /etc/motd you can redirect the output there:

run-parts /etc/update-motd.d/ | sudo tee /etc/motd

To speed up logins you can switch from libpam-motd to update-motd. Update-motd uses a cronjob instead of triggering the update on login. sudo apt-get remove libpam-motd; sudo apt-get install update-motd

Hope that helps somebody.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.