Fear and Loathing in Linux, or Who Needs /etc/motd (2010)
web.archive.org
web.archive.org
When I started years ago there was LILO. It had quirks and was a pain to configure. Then grub came along and it had some great new features -- edit the easy-to-understand config file, and changes would automatically take effect. Easy background images. Easy menu building in the config file. Grub understood enough of the filesystem to avoid the LILO cruft.
Now there seems to be about 5 layers of indirection, autodetection, probing, and shell scripting hacks to generate scripts that will eventually spit out a mess of obfuscated grub config files, and god forbid you touch any of this mess because any changes you make will be overwritten (a) next boot, (b) next time the scripts decide to update the config, (c) next system update, or (d) just whenever. All of this dynamic stuff to configure something that, for many systems, needs a config change about zero times per year.
It's not even fair to say LILO was "a pain to configure". `lilo.conf` was pretty clear and straightforward.
It's just that boot-loading is arcane and dangerous. This makes it possible to make your LILO screw-ups really simple and obvious. Which is much better than the kind of screw-ups you can make with GRUB.
It works every single time without even one failure. On the other hand grub has failed me multiple times on the machines it's installed on.
Grub has an overly complex config that you can't verify until you reboot and try it - if it fails you have a huge pain trying to get the exact right code to type in to make it work.
Lilo on the other hand either works, or it tells you it didn't before you reboot, which makes it much more reliable.
Lilo is better.
The contents of /etc/motd are displayed by pam_motd(8) 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, dynamic content configured at /etc/pam.d/login is also dis‐
played by pam_exec.
Which seems pretty sane.> ….Did that really just take as long as I thought? This machine has a gigabit connection to the Internet. I must be imagining something.
> ….Okay, I wasn’t imagining something. It must have downloaded a TON of source!
root@tessier:/usr/src/ubuntu# du -sh
19M .
> …Oh. I guess not. But, hey, fuck git, or something.Having a gigabit internet connection means you can download any content from any server in the world at 1Gb/s, right? /s
The tone of the post makes it pretty hard to take that rant seriously.
This is not about the server being slow, it's that Bazaar is really astonishingly inefficient and badly designed. Look at the guy in the replies who says "it's not that bad, I can clone a bzr repo in under 2 minutes". That is what you get used to when you use Bazaar.
Anecdotal, but bzr(1) has always run fairly slowly for me. I don't know much about it, so perhaps I'm doing something wrong, but I've never gotten it to download at more than a few KBps, when git(1) manages to hit my max download speed easily.
This propensity for complexity is really irksome. The "generation lost in the Bazaar" headline couldn't be better timed.
I use Arch at home and Ubuntu servers and containers at work. Ubuntu auto-detects and auto-configures much more than Arch does but that last 10% can be a hell of fight with Ubuntu due to the added complexity.
I dumped Ubuntu when the Unity Netbook Edition switched from the (beautiful) EFL libraries to Qt, which added significant performance penalties, and then the main distro adopted the new interface. It felt like everything could've been built upon Plasma 5, but because it wasn't controlled by them, they had to make their own in order to be XKCD-927 Compliant.
Their fault is not so much in complexifying motd, it's in removing the simple options for the majority of people who don't need the added configurability.
I have the same complaint about what has happened to Xorg.conf, or grub2. Yay, they are more flexible and dynamic. But they also run contrary to Unix philosophy of simplicity
B. Paternalism.
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.Stupid changes will always occur. They may even be fixed one day. For me, the big problem is that software changes should imply an update of the man pages.
When I introduce unix (shell) to someone, I always start with the command man (man man).
I dream of a system where all the commands and all the options are documented in man pages that are up to date.
Yeah, why would you want to generate the motd -- the message of the DAY file -- dynamically, through a daily cron job? Ludicrous! That file is supposed to be static!
And that was literally just the opening statement. The rest of the article is also littered with misinterpretations and misrepresentations.
Simple counter-example to your point: other Debian packages who wish to provide information in /etc/motd. The solution to go with drop-in directories (just like /etc/cron.d) has certain advantages over other patterns, but the author seems to be oblivious to all of this.
The author posted the following as the conclusion of the article: remove the symlink, create your own motd.
root@tessier:/etc# rm -rf motd && echo "DO I WORK NOW??" > /etc/motd
It doesn't get much simpler or intuitive than that.> Furthermore, motd is a tool for sysadmin anouncements, not random news from random packages, so autogenerating is not all that useful.
Nobody suggested it was for random news for random packages. Useful examples would be output from smartmontools, unattended-upgrades, systemd or any other sysadmin-relevant package which might perform periodic tasks in the background.
mail -s '<subject>' $(awk -F: '/^<group-name>/ {print $4;}' /etc/group | tr , ' ')
Good use of motd: pointers to essential reading for new users, like a tutorial, some man pages, etc.; contact information, to sysadmins, product help desk etc. The user reads it to get clues on how to get going with the system, then runs 'touch $HOME/.hushlogin' to silence it.Edit: Besides, the manual does not tell you that simply breaking the symlink will do the desired effect.
Running a set of shell scripts on every login is not the same as generating a file through a cron job. The author is complaining about the former, while you're stating he complains about the latter.
It's would be proper to take care not to misrepresent matters while accusing others of doing it.
Please use:
bzr get https://code.launchpad.net/~ubuntu-core-dev/pam/ubuntu
to retrieve the latest (possibly unreleased) updates to the package.
So we ubuntu users are possibly running possibly unreleased code to manage authentication.Isn't this like an ultra-serious issue ?
apt-get source <package>
will get you the exact source of the package as released = installed on your system (assuming only one version is present -- otherwise, it returns the newest, but this is configurable).The message you are seeing is a hint to other developers that the development HEAD is in Bazaar.
This is similar to the relation between GitHub releases, and the master branch.
Thats a complexity that doesn't make any sense.
PAM is why systemd has its own SU replacement, because their Logind PAM module was mangling environment variables when SU was used.
Also, as the sibling notes, this kills MOTDs entirely, not because for some reason we need to bolt this whole contraption together and then not really document it at all. Ubuntu!
That's quite presumptuous I think. You may find it effectively useless. Others may not. The job of a default is to cater for a majority. One size does not fit all, so it is certain that there will exist people unhappy about the default whatever it is. So just because some number of people complain does not mean that the default is wrong.
On the other hand, I accept the documentation could be improved, but this does generally need someone other than the author to point out deficiencies. The author could have written and submitted a documentation patch in the time it took him to write that blog post.
edit: Thanks for the downvotes! I love that anything can be used as a non-sequitur to start bagging on systemd these days. Apparently it's wrong to even ask someone how this article about motd relates to systemd. I'll try to remember that.
And the entirety of systemd is an overly complex mess that does a lot of this. It tries to replace cron. It tries to replace automounters. It tries to replace inetd. It will try to replace dbus, with the aid of the kernel. It replaces everything for no good reason, and that which it doesn't replace, it consumes.
Do one thing well, work together, and handle text streams? More like do everything meh, work alone, and handle binary formats known only to you.
2. Replace it. Without apparent option. In the /etc/motd case, the problem was one of swapping a read file with a dynamic process in more-or-less the same namespace. Systemd at least advertises its malevolence.
3. Fail to adequately document behaviours.
4. Deprecate bug reports.
5. Create a fragile system within a core system context (login(1), init(8)).
Rinse, wash, repeat, rofl, weep.
I agree you shouldn't have been downed, but I DID explain in detail, as did others, why my post wasn't a non-sequitur.