12 ms·
Fear and Loathing in Linux, or Who Needs /etc/motd (2010)
- 0x0 10y agoDebian 8 has gone back to a normal file in /etc/motd and has gotten rid of all the motd.tail shenanigans, though. :)
- pdw 10y agoYes. The description section of Debian's motd(5) manpage now reads: 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.
- blahblahblah43 10y agoTypical Linsux: over-complicate the solution due to users who were once Windows slaves, in the name of progress!
- dfox 10y agoIt seems to me that the cited motd(5) manpage cleanly states that breaking the /etc/motd symlink is what you should do if you want to manage it's contents yourself.
- the_mitsuhiko 10y agoWhere does it say that?
- dfox 10y agoIt seems to be somehow cut off, but: 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.
- prodigal_erik 10y agoWhat it clearly states is that the symlink is expected to exist, with no assurance that something sane will happen if it doesn't.
- rlpb 10y agoDon't like it? Just drop the calls to pam_motd.so from /etc/pam.d/login. Done.
- prodigal_erik 10y agoIt looks like that also skips displaying /etc/motd. If you just want to skip regenerating /var/run/motd, you have to blow away /etc/update-motd.d but continue running pam_motd.so because it's bizarrely responsible for both.
- eropple 10y agoI feel obligated to point out that having to "just" do that is kind of really insane. Making the default provide effectively useless information (nobody's gonna scroll back to read that motd for an IP address and it sure doesn't replace running htop for system info), and then making actually fixing the original mistake difficult and annoying, is not a good look. 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!
- voidz 10y agoYou use a lot of words. Insane? It is actually quite the opposite, pam is where the author should have started. Not knowing about pam and refusing to learn about it, as a server administrator: if I ever would call something insane..
- eropple 10y agoOne of us has written PAM modules that are being used in production environments and the other one of us is you. I still wouldn't think to look there if I didn't happen to recall, in my junk drawer of Stuff I Shouldn't Need To Know But Do Anyway Because System Administration Is Bullshit, that pam_motd.so is a thing. And it gets better: by cavalierly modifying that, you would have been wrong besides; you just turned off MOTDs, not controlled them, because that is the update-motd horrorshow's job. So explain to me why any of this matters to the problem at hand in the first place?
- qwertyuiop924 10y agoAh... And we see one of the many roots of the cancer that metastacized into systemd. Because everybody expects all their live processes (screen included) to die when they log out, right?
- colemickens 10y agoWhat does this article have to do with systemd, let alone the very specific, recently-widely-discussed issue you're referencing to? 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.
- qwertyuiop924 10y agoIt's another example of invalidating an old convention for no good reason. 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.
- serge2k 10y agoSo this article has nothing to with systemd.
- qwertyuiop924 10y ago...Aside from the fact that the article is about the attitude amongst devs that manifested itself both as the motd-framework and as systemd, making this article thourougly linked to systemd, yes.
- 10y ago
- charonn0 10y agoWhy not unset the execute bit on the motd shell scripts? I seem to recall that being the solution for disabling motd in Ubuntu (at least it was a few years ago when I did it.)
- xupybd 10y agoThis is the same crap they pulled with networking. The first 30 mins after an Ubuntu install is now pulling out the automatic networking rubbish.
- anonbanker 10y agoI think you'd really like Arch or Devuan. You seem to be progressing past Ubuntu.
- voltagex_ 10y agoCouldn't you also say that it might be worth trying to help the Ubuntu project get better by fixing some of these problems?
- MrTonyD 10y agoI'm dumping Ubuntu. They think that all these churning changes are improvements and they are too swayed by their own intellectual arguments as Engineers. If you look at history, Windows overtook Apple when Apple broke compatibility to improve their product (most people have forgotten that at one time Apple was ahead of Windows in the PC world - and many thought that Windows didn't stand a chance.) Even great product changes have a cost - and they don't seem to understand that.
- anonbanker 10y agoUbuntu will still be very compatible with Debian, which provides second-only-to-Redhat levels of compatibility and package availability. The problem is their internal application ecosystem; instead of contributing Wayland and GNOME/KDE, they decided to reinvent the wheel. Yes, they have Samsung and other corporations on-board to support their vision, but it doesn't contribute to Linux/GNU overall. 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.
- vmarsy 10y agoThis seems to be a (2010) post. > ….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.
- eaceaser 10y agoYeah. Honestly, of all things to be (ostensibly) this angry about...
- tomc1985 10y agoOne cut in a death by thousands perhaps? This propensity for complexity is really irksome. The "generation lost in the Bazaar" headline couldn't be better timed.
- mdadm 10y ago>Having a gigabit internet connection means you can download any content from any server in the world at 1Gb/s, right? /s 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.
- rspeer 10y agoHave you used Bazaar? I wouldn't blame you if you haven't. 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.
- Paul_S 10y agoI remember when I ran into login issues after switching from debian and tracking it down to the motd clusterfuck. My solution was to use hosts file to block any attempts to communicate with canonical. Probably saved myself extra hassles with other "smart dynamic" solutions.
- tomc1985 10y agoWhy do all these developers hate simplicity?
- cocotino 10y agoBecause complexity lets them keep their jobs for longer. :-)
- CaptSpify 10y agoHonestly, I think it comes from the need to pad resumes. "Rewrote motd system" sounds a lot better than "Reviewed existing motd system, couldn't see any need for improvement"
- voidz 10y ago"all these"?
- digi_owl 10y agoA. Corner-cases. B. Paternalism.
- knieveltech 10y agoThis, more than anything else, is why I've come to truly detest web development generally and open source CMSs in particular.
- rakoo 10y agoBecause they have different needs ? Maybe they do want to see how many processes are running, who's connected, and some simple status on the machine, contrary to OP ? 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.
- tomc1985 10y agoComplex problems sometimes require complex solutions. I get it. But this implementation, where all are suddenly thrust into the complex solution for something that the collective memory determines to be simple, is a net negative. 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
- keypusher 10y agoIf you care about this kind of stuff, you may want to consider running something other than Ubuntu. Debian, CentOS, FreeBSD, etc.
- Adutude 10y agoI think this might be a bikeshed discussion. http://bikeshed.com http://bikeshed.com
- sp332 10y agoIt's not just wanting the message to be different. It's that it is now very difficult to figure out how to even change the message.
- failrate 10y agoIt's not even wanting it to be different: it's wanting complete control of the processes. I am positive that the more complicated motd is vulnerable in some way the basic motd is not.
- voidz 10y agoNot really. `pam` is where you look.
- CaptSpify 10y agoYour kind of proving the point though. WTF does 'pam' have to do with the motd? Thats a complexity that doesn't make any sense.
- digi_owl 10y agoWelcome to "modern" Linux where PAM is everything. PAM is why systemd has its own SU replacement, because their Logind PAM module was mangling environment variables when SU was used.
- orbat 10y agoExcept it's not even that "simple", which was the whole point of the article
- kevhito 10y agoAs a reluctant admin for a half dozen odd home and work systems, and having just dealt with a few clean reinstalls, the /etc/motd issue bit me too. It also reminded me a bit of the horror that grub configuration has become. 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.
- adrianratnapala 10y agoI'm with you except that I never understood grub, not even when it was new and innocent. 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.
- pjc50 10y agoWell, apart from the most common screwup: changing something and then not rerunning LILO.
- ars 10y agoI find grub incomprehensible so I still use lilo on my home computer. 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.
- ckastner 10y agoIt is almost comical how the author went info full rage mode about a change without even pretending to try to comprehend why it was implemented. 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.
- gkya 10y agoThat's not what he criticises. His criticism is about all the bloat that's there as layers of unnecessary abstractions for what can be done with a simple script that's run regularly by cron as root (or rather as a separate motd user who can write to /etc/motd, for better security).
- ckastner 10y agoA simple script may be sufficient to address your needs, but please don't generalize that to everyone else. 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.
- gkya 10y agoIt should be obvious how to disable the mechanism for being able to use the normal, expected behaviour. The author is hostile in his way of writing, but the point stands. Furthermore, motd is a tool for sysadmin anouncements, not random news from random packages, so autogenerating is not all that useful.
- ckastner 10y ago> It should be obvious how to disable the mechanism for being able to use the normal, expected behaviour. 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.
- reacweb 10y agoI agree with most of this very interesting rant. Stupid changes like this one makes many people lose a lot of time. 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.
- znpy 10y agoPlease 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 ?
- ckastner 10y agoNo, because that is not what is happening. The author is completely misconstruing that information fragment. 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.
- kasabali 10y agoPrevious discussion: https://news.ycombinator.com/item?id=3325510 https://news.ycombinator.com/item?id=3325510
- jimjag 10y agoIt was the systemd of its day... Declare it "broken"; "fix" it; Make it super complex and ignore some of the basic tenets behind the success of Unix-like system ('everything is a file', 'avoid monolithic code', 'filters and i/o redirection', etc...)