New to this world, and trying to customise motd setup on ubuntu 17.10.
Mostly understand how it works, but all I see on logon is the 'Last login: <date> from <IP>'
I have checked the following as per https://askubuntu.com/questions/5387...n-ubuntu-14-04 and all appear ok:
- file /etc/pam.d/login contains the following:
session optional pam_motd.so motd=/run/motd.dynamic
session optional pam_motd.so noupdate
- file /etc/ssh/sshd_config contains the following:
UsePAM yes
PrintMotd no
however running sudo run-parts /etc/update-motd.d/ doesn't display the expected message.
I have followed this article: https://ownyourbits.com/2017/04/05/c...an-and-ubuntu/ still no message.
I then backed out those changes and removed and reinstalled update-motd which stopped me getting the last logon details. Reinstalling them I can see the timestamp again.
I then followed this article: https://wiki.ubuntu.com/UpdateMotd and noticed the following:
- /etc/update-motd.d directory existed but no scripts / files therein. I created a sample script as per that article and added it to the directory as '10-stats'. Contents below:
Code:
#!/bin/sh
echo
date
echo
who
echo
uptime
- /etc/cron.d/update-motd doesn't exist at all.
- Still trying to run
Code:
sudo run-parts /etc/update-motd.d/
returns nothing and login only displays the last login date/source. I can execute 10-stats fine and get the expected output.
I've now confused myself silly and need some help. Any pointers anybody?
Thanks
Bookmarks