How to remove legal notice from MOTD / Banner for non-root users
- clear/remove
/etc/legal
that contains the message
... or ...
- create a file
~/.cache/motd.legal-displayed
Read more: ubuntuforums.org/showthread.php?t=1511335
I use Ubuntu 20.04, a release newer than sam's answer. The very old thread cited there was closed 11 years ago and doesn't mention the method I used to fix the problem: emptying the 3 files in /var/lib/ubuntu-advantage/messages
.
root:/var/lib/ubuntu-advantage/messages# ls -l
total 0
-rw-r--r-- 1 root root 0 Sep 11 03:10 apt-pre-invoke-esm-service-status
-rw-r--r-- 1 root root 0 Sep 11 03:10 motd-esm-service-status
-rw-r--r-- 1 root root 0 Sep 11 03:09 ubuntu-no-warranty
I found it (and some other files I ignored) by executing this:
find / -xdev -type f -exec grep -l 'ABSOLUTELY NO WARRANTY' {} \;