--- created_at: '2016-08-08T22:43:41.000Z' title: Fear and Loathing in Linux, or Who Needs /etc/motd (2010) url: http://web.archive.org/web/20131205090841/http://deadmemes.net/2010/10/19/fear-and-loathing-in-debianubuntu-or-who-needs-etcmotd author: akkartik points: 137 story_text: comment_text: num_comments: 77 story_id: story_title: story_url: parent_id: created_at_i: 1470696221 _tags: - story - author_akkartik - story_12251330 objectID: '12251330' year: 2010 --- [Source](http://web.archive.org/web/20131205090841/http://deadmemes.net/2010/10/19/fear-and-loathing-in-debianubuntu-or-who-needs-etcmotd "Permalink to Fear and Loathing in Debian^H^H^H^H^H^H/Ubuntu (or: who needs /etc/motd) | Blindly Accept the Defaults") # Fear and Loathing in Debian^H^H^H^H^H^H/Ubuntu (or: who needs /etc/motd) | Blindly Accept the Defaults ![Wayback Machine][1] success fail [ ][2] [ ][3] | ----- | | | | [**Apr**][4] | DEC | [**Mar**][5] | | ![Previous capture][6] | 05 | ![Next capture][7] | | | | [**2012**][4] | 2013 | [**2016**][5] | | | [22 captures][8] 13 May 2011 - 12 Jan 2018 | [ ][9] | [ About this capture][10] COLLECTED BY Organization: [Archive Team][11] ![][12] Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history. History is littered with hundreds of conflicts over the future of a community, group, location or business that were "resolved" when one of the parties stepped ahead and destroyed what was there. With the original point of contention destroyed, the debates would fall to the wayside. Archive Team believes that by duplicated condemned data, the conversation and debate can continue, as well as the richness and insight gained by keeping the materials. Our projects have ranged in size from a single volunteer downloading the data to a small-but-critical site, to over 100 volunteers stepping forward to acquire terabytes of user-created data to save for future generations. The main site for Archive Team is at [archiveteam.org][13] and contains up to the date information on various projects, manifestos, plans and walkthroughs. This collection contains the output of many Archive Team projects, both ongoing and completed. Thanks to the generous providing of disk space by the Internet Archive, multi-terabyte datasets can be made available, as well as in use by the [Wayback Machine][14], providing a path back to lost websites and work. Our collection has grown to the point of having sub-collections for the type of data we acquire. If you are seeking to browse the contents of these collections, the Wayback Machine is the best first stop. Otherwise, you are free to dig into the stacks to see what you may find. **The Archive Team Panic Downloads** are full pulldowns of currently extant websites, meant to serve as emergency backups for needed sites that are in danger of closing, or which will be missed dearly if suddenly lost due to hard drive crashes or server failures. Collection: [ArchiveBot: The Archive Team Crowdsourced Crawler][15] ArchiveBot is an IRC bot designed to automate the archival of smaller websites (e.g. up to a few hundred thousand URLs). You give it a URL to start at, and it grabs all content under that URL, records it in a WARC, and then uploads that WARC to ArchiveTeam servers for eventual injection into the Internet Archive (or other archive sites). To use ArchiveBot, drop by #archivebot on EFNet. To interact with ArchiveBot, you issue commands by typing it into the channel. Note you will need channel operator permissions in order to issue archiving jobs. The dashboard shows the sites being downloaded currently. There is a dashboard running for the archivebot process at . ArchiveBot's source code can be found at . TIMESTAMPS ![loading][16] # [Blindly Accept the Defaults][17] ## Just hit yes. [ ![][18] ][19] Search ### Main menu [Skip to primary content][20] [Skip to secondary content][21] * [Home][22] * [About][23] ### Post navigation ←[ Previous][24] [Next →][25] # Fear and Loathing in Debian^H^H^H^H^H^H/Ubuntu (or: who needs /etc/motd) Posted on [2010.10.19][26] by [baughj][27] Whoever looked at /etc/motd on ubuntu and thought, HEY, I KNOW WHAT THIS NEEDS – SHELL SCRIPTS! can kindly go die. Seriously? /etc/update-motd.d? Ubuntu introduced the update-motd framework, by which the motd(5) is dynamically assembled from a collection of scripts at login. …Okay, great. Where’s **/etc/default/STOP_IT**? You know what’s even better then making something overcomplicated? Changing decades of expected behavior and not providing a way to, say, opt out. I don’t want to run a fuckload of stupid shell scripts every time I login that do super informative tasks like telling me the IP address assigned to my loopback device. I also don’t want to be told that I should use Landscape, or that there are 83 processes running on my machine. Still, I could accept all of this if you could just make it go away….but you can’t. root@tessier:~# cat > /etc/motd FUCK YOU Nope….still there. Want to know what’s **even better**? Deprecating /etc/motd _and not updating its own manpage_: NAME motd - message of the day DESCRIPTION The contents of /etc/motd are displayed by login(1) after a successful login but just before it executes the login shell. The abbreviation "motd" stands for "message of the day", and this file has been traditionally used for exactly that (it requires much less disk space than mail to all users). On Debian GNU/Linux this file is a symbolic link pointing to /var/run. The contents of this file are regenerated upon every system boot based on the contents of /etc/motd.tail. Way to win, guys! It would be fine, completely fine, if this was just some cron job that could just be disabled (preferably with an /etc/default switch!). I could live with that. It’s reasonable behavior. Before Lucid, that was basically what was happening: NAME update-motd - Automatically update the message-of-the-day (MOTD) SYNOPSIS update-motd [--disable|--enable|--force] [d|hourly|daily|weekly|monthly] OPTIONS --disable Prevent update-motd from running. This is useful for temporarily disabling automatic updates of /etc/motd by the /etc/cron.d/update-motd cronjob. Note that this regenerates a base MOTD without the update-motd additions, and then exits. But, no, no, this is far more insidious. /etc/motd was _sooooo 1980_, bro! Regular files are for losers, don’t you want to use w3m to update your MOTD with headlines from Google News? Shit, I mean, why use a plain file **when you can use a PAM module?** So, here it is, in login and sshd: # Prints the motd upon succesful login # (Replaces the `MOTD_FILE' option in login.defs) session optional pam_motd.so Okay, disabling that results in nothing being printed. And hey, the manpage for pam_motd helpfully says: NAME pam_motd - Display the motd file SYNOPSIS pam_motd.so [motd=/path/filename] DESCRIPTION pam_motd is a PAM module that can be used to display arbitrary motd (message of the day) files after a successful login. By default the /etc/motd file is shown. The message size is limited to 64KB. OPTIONS motd=/path/filename The /path/filename file is displayed as message of the day. ….Uh oh. /etc/motd is shown by default? That doesn’t sound right! Well, maybe the module will actually accept the option its manpage advertises: session optional pam_motd.so motd=/etc/motd Hahaha! Of course not! _Why would that work?!_ I still get a bunch of shit output from shell scripts. Okay, fine. Now, I **really** want to know why: root@tessier:/usr/src# locate pam_motd.so /lib/security/pam_motd.so root@tessier:/usr/src# dpkg -S /lib/security/pam_motd.so libpam-modules: /lib/security/pam_motd.so root@tessier:/usr/src# apt-get source libpam-modules Reading package lists... Done Building dependency tree Reading state information... Done Picking 'pam' as source package instead of 'libpam-modules' NOTICE: 'pam' packaging is maintained in the 'Bzr' version control system at: https://code.launchpad.net/~ubuntu-core-dev/pam/ubuntu Please use: bzr get https://code.launchpad.net/~ubuntu-core-dev/pam/ubuntu to retrieve the latest (possibly unreleased) updates to the package. …At this point, **words fail me**. But, hey, let’s just take a look at the source, first. I want to know what’s going on, at least. It seems really unlikely that pam_motd is just blithely ignoring its options: PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) { int retval = PAM_IGNORE; int fd; const char *motd_path = NULL; char *mtmp = NULL; if (flags & PAM_SILENT) { return retval; } for (; argc-- > 0; ++argv) { if (!strncmp(*argv,"motd=",5)) { motd_path = 5 + *argv; if (*motd_path != ' [1]: http://web.archive.org/static/images/toolbar/wayback-toolbar-logo.png [2]: http://web.archive.org# "Share via My Web Archive" [3]: https://archive.org/account/login.php "Sign In" [4]: http://web.archive.org/web/20120420015638/http://deadmemes.net:80/2010/10/19/fear-and-loathing-in-debianubuntu-or-who-needs-etcmotd/ "20 Apr 2012" [5]: http://web.archive.org/web/20160304114308/http://deadmemes.net/2010/10/19/fear-and-loathing-in-debianubuntu-or-who-needs-etcmotd/ "04 Mar 2016" [6]: http://web.archive.org/static/images/toolbar/wm_tb_prv_on.png [7]: http://web.archive.org/static/images/toolbar/wm_tb_nxt_on.png [8]: http://web.archive.org/web/20131205090841*/http://deadmemes.net/2010/10/19/fear-and-loathing-in-debianubuntu-or-who-needs-etcmotd "See a list of every capture for this URL" [9]: [10]: http://web.archive.org#expand [11]: https://archive.org/details/archiveteam [12]: http://archiveteam.org/images/e/e6/Archiveteam.jpg [13]: http://www.archiveteam.org [14]: http://archive.org/web/web.php [15]: https://archive.org/details/archivebot [16]: http://web.archive.org/static/images/loading.gif [17]: http://web.archive.org/web/20131205090841/http://deadmemes.net/ "Blindly Accept the Defaults" [18]: http://web.archive.org/web/20131205090841im_/http://deadmemes.net/wp-content/themes/twentyeleven/images/headers/shore.jpg [19]: http://web.archive.org/web/20131205090841/http://deadmemes.net/ [20]: http://web.archive.org#content "Skip to primary content" [21]: http://web.archive.org#secondary "Skip to secondary content" [22]: http://web.archive.org/web/20131205090841/http://deadmemes.net/ "Home" [23]: http://web.archive.org/web/20131205090841/http://deadmemes.net/about/ [24]: http://web.archive.org/web/20131205090841/http://deadmemes.net/2010/09/30/the-gout-sucks/ [25]: http://web.archive.org/web/20131205090841/http://deadmemes.net/2011/02/26/howto-freebsd-8-2-release-hvm-guest-on-xen-4-debian-squeeze/ [26]: http://web.archive.org/web/20131205090841/http://deadmemes.net/2010/10/19/fear-and-loathing-in-debianubuntu-or-who-needs-etcmotd/ "2:01 pm" [27]: http://web.archive.org/web/20131205090841/http://deadmemes.net/author/admin/ "View all posts by baughj"