The issue seem to be related to inconsistencies with pam_motd module. However it's later trying to read from /run/motd.dynamic - which was never created 20318 rename("/var/run/motd.new", "/var/run/motd") = 0Ģ0318 open("/run/motd.dynamic", O_RDONLY) = -1 ENOENT (No such file or directory) So i strace'd sshd process.From that trace (interesting parts shown below), you can see that newly created motd.new file is renamed to /var/run/motd. However at this time, there was no change in motd. rwxr-xr-x 1 root root 41 Dec 1 22:52 cat 00-headerĮcho 'Welcome !! This is a cat 90-fortune rwxr-xr-x 1 root root 58 Dec 1 23:21 00-header mkdir /etc/update-motd.dĬreated two test files as below and made them executable cd ls -l I am able to test simple dynamic-motd with fortune example on my Debian Jessie 8.2 host as below and found the issue to be related to a buggy behavior. ![]() The example from the post mkdir /etc/update-motd.dĬat > /etc/update-motd.d/10logo /etc/update-motd.d/20updates <<'EOF' That script does not exist in the package anymore, so the file does not have the intended effect. One of them would cat the contents of this file so it was easy to add static content. /etc/motd.tail – The Ubuntu package used to populate /etc/update-motd.d.It is also updated by PAM by running the scripts in /etc/update-motd.d/, if they exist. It is updated by /etc/init.d/motd at every boot. /var/run/motd.dynamic – This is what is shown on login currently./var/run/motd – This was used by Ubuntu’s first implementation.If it is created, however its contents will be printed too. Does not exist anymore in Ubuntu 16.04 LTS, not even as a symbolic link to /var/run/motd. So this is how things are currently: PAM will just read /var/run/motd.dynamic and /etc/motd if it exists (paste from post) ![]() Then Ubuntu came up with their own package update-motd based on a script called from cron.įinally, PAM copied Ubuntu's idea of /etc/update-motd.d/, and therefore Debian and others also have that behaviour.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |