Login
You're viewing the tty0.social public feed.
  • JdeBPJdeBP
    Oct 8, 2026, 6:34 PM

    @ska

    warts for you:

    Consder pam_motd(8). *Unless* the noupdate option is given, it rewrites the motd file by default. Which means that it has to run as the superuser. It rewrites the motd file by running a bunch of shell scripts. As the superuser.

    In BSD login(1), the motd is read and printed *after* privileges have been dropped. And rewriting of /etc/motd is under the control of a separate single-shot motd service that runs at bootstrap or on demand.

    💬 2🔄 0⭐ 1

Replies

  • JdeBPJdeBP
    Oct 8, 2026, 6:46 PM

    @ska

    On top of that, to retain the old behaviour, Debian invokes pam_motd(9) twice, and then pam_mail(8).

    This results in three separate calls to the pam_conv callback, which is a problem if one is presenting the UI as dialogue boxes. One gets three successive dialogue boxes, after the actual dialogue box.

    In part this is a design failure of pushing two different sorts of things (dialogues and post-login greeting messahes) through one pam_conv function.

    💬 1🔄 0⭐ 0