ubuntu update-motd

Reading Time: 2 minutes

Updated: 11/16/2024

We are going to talk briefly about something which is largely cosmetic. I chose those words with some care. This is one of those things I look at every once in a blue moon and by in large I could care less about. But every once in a while, you just have a conniption fit and you say… please can’t we cut down on the crap.

We are going to discuss the Ubuntu update-motd directory.

ubuntu@nodex:/etc/update-motd.d$ ls -la
total 68
drwxr-xr-x   2 root root  4096 Sep 19 19:03 .
drwxr-xr-x 130 root root 12288 Nov 16 13:34 ..
-rwxr-xr-x   1 root root  1220 Oct 15  2021 00-header
-rwxr-xr-x   1 root root  1151 Jan  2  2024 10-help-text
lrwxrwxrwx   1 root root    46 Sep 19 17:43 50-landscape-sysinfo -> /usr/share/landscape/landscape-sysinfo.wrapper
-rwxr-xr-x   1 root root  5023 Oct 15  2021 50-motd-news
-rwxr-xr-x   1 root root    84 Feb 19  2022 85-fwupd
-rwxr-xr-x   1 root root   218 Jul 14  2021 90-updates-available
-rwxr-xr-x   1 root root   296 Apr 30  2024 91-contract-ua-esm-status
-rwxr-xr-x   1 root root   558 Apr 18  2022 91-release-upgrade
-rwxr-xr-x   1 root root   165 Feb 19  2021 92-unattended-upgrades
-rwxr-xr-x   1 root root   379 Mar 30  2022 95-hwe-eol
-rwxr-xr-x   1 root root   111 Aug 17  2020 97-overlayroot
-rwxr-xr-x   1 root root   142 Nov 26  2020 98-fsck-at-reboot
-rwxr-xr-x   1 root root   144 Nov 26  2020 98-reboot-required

Each of these files are set to possibly chirp some additional information at login.

If you want to cut down on some of the chatter you don’t have to delete the script. You can simply keep it from being executable and boom – the problem that isn’t really a problem … is no longer a problem.

The following are my choices to date.

chmod a-x 10-help-text
chmod a-x 90-updates-available
chmod a-x 50-landscape-sysinfo
chmod a-x 50-motd-news

What I am really going to think about and judge for a while is if I want it to nag me when a reboot is pending. ie. If I did a firmware update and it gently prompts you that a reboot … if convenient … might not be a bad thing.

References:
https://github.com/amazonlinux/update-motd
https://askubuntu.com/questions/463462/sequence-of-scripts-sourced-upon-login
https://wiki.debian.org/motd

This entry was posted in Administration, Ubuntu. Bookmark the permalink.