[Bug 684244] Re: Multiple issues with pam_motd update-motd code
Steve McIntyre
684244 at bugs.launchpad.net
Thu Nov 24 19:09:32 UTC 2011
Hmmm.
I don't think I saw a message to tell me there was an update to this
bug, which is why I've not responded in ages. But I could be wrong...
I've just been bitten by this daft issue again, which prompted me to
look at this bug for any responses.
Using a micro-SD card with an ARM lucid installation, just logged in via
the serial console to rescue the real system (installed on a SATA hard
drive but broken due to kernel testing).
Logging in as root, multiple seconds (maybe 20?) with no discernible
activity. Then it eventually printed out the motd. I've just removed all
of /etc/update-motd.d to save me the pain again on this machine. I'm
guessing that the *huge* slowdown could well be due to network timeouts
on this device, which is not on the network. Or maybe the very slow uSD
is the problem.
Going back to the report:
If console logins are so rare, I don't see any value to update-motd
anyway. Even on a system without the long delays I'm seeing, it looks
like make-work. In my case, I'm only using the console to start with to
try and fix a problem, so slowing down access to the console
unnecessarily is very frustrating.
In terms of the bad coding with no locking, I'm afraid you'll have to
look elsewhere for fixes. My preferred solution to this would be to
simply remove the update-motd misfeature altogether.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pam in Ubuntu.
https://bugs.launchpad.net/bugs/684244
Title:
Multiple issues with pam_motd update-motd code
Status in “pam” package in Ubuntu:
Triaged
Bug description:
Package: libpam-modules
Version: 1.1.1-2ubuntu5
Running Lucid on a Beagleboard, wondering why logins take so long.
Horrified to find that the problem is pam_motd... Several issues:
1. Why on earth is *every* login updating a global file (/etc/motd -> /var/run/motd)?
a. Why spam every user?
b. Why even write to the file every time? It's being generated on all logins, so there doesn't seem to be any useful caching go on.
2. This is adding ~5 seconds of startup lag to every login, which is annoying
3. I don't see any locking around the updates of /var/run/motd.new, so it seems that multiple parallel logins could easily case corruption
4. No documentation of any of this in pam_motd(8)
If you must update motd automatically, then surely running something
via cron would be better than this messy hack?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pam/+bug/684244/+subscriptions
More information about the foundations-bugs
mailing list