
Fear and Loathing in Debian/Ubuntu (or: who needs /etc/motd) - robinhouston
http://deadmemes.net/2010/10/19/fear-and-loathing-in-debianubuntu-or-who-needs-etcmotd/
======
ChuckMcM
As with many things Linux there are a lot of cultures that feed into it. And
the author's frustration on the implementation of motd serve as a reasonable
exemplar of this.

There are two (maybe three) nominal 'people' in this particular circle of
hell, one is the developer who originally felt that the message of the day
should reflect something important without having to actually edit it every
day. One is the guy who wants the motd to have something different in it.
Culturally the first guy is the 'lazy' type (in quotes because it reflects the
culture of "hey I've got a computer here the more work it does the less I do"
which is a popular meme in system administrator circles and elsewhere) and the
other is the 'KISS' type (where KISS is the 'keep it simple stupid' type of
person who oftens stresses simplicity over mechanism. The third (perhaps
absent) person is the 'systems' person/distro owner who imposes an implicit
design guideline on the system by virtue of the changes they accept or don't,
commit or don't into what becomes the final product. In the kernel tree this
is clearly Linus but in other parts of the system it isn't always clear
whether or not there even is someone in this role.

Underlying this I find a strong sense of frustration at changes that are made
to 'small, meaningless' parts of the system when large parts sit there on
fire. Of course not everyone can fix bugs in EXT4 or memory leaks in long
running daemons, everyone needs to start somewhere, and sometimes changing the
colors around in ls(1) so that the default is unreadable on your favorite
color scheme is probably some 'starter project' of someone who wants to become
a bigger part of the solution.

It is the experience you get when you use Linux, and that experience is an
artifact of how Linux is created. So hating it isn't particularly productive,
although like UNIX-haters before it rooted in much the same arguments.

~~~
pnathan
It just didn't have to happen, though.

Without debating the (IMO very questionable) utility of changing motd
behavior, or the (IMO too sloppy) change management of Ubuntu...

A three-line update to man motd would have solved the problem, and the motd
maintainer didn't do that, _and_ whoever accepted the patch didn't do that,
_and_ now anyone who wants to figure what the Penguin is going on is going to
have to google for it and, hopefully, find the answer before they hit the
"download source" rabbit hole.

All because of a few sentences.

Yeah, at home I don't use Ubuntu directly anymore. =)

~~~
eridius
The manpage said:

> 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.

The fundamental problem here is the blog author didn't realize that `echo foo
> /etc/motd` wouldn't work, even though the manpage did, in fact, inform him
that /etc/motd was just a symlink to something that gets regenerated at boot
time. I'm not really sure what the manpage could have done to make it more
obvious what his problem was.

Now, it's possible the manpage is out of date, and that it's regenerated via
some other mechanism than /etc/motd.tail. I don't know (since I don't use
Debian, or even Linux in general). But the salient point here was that it
points to a file that gets regenerated at boot time.

*Edit: On second look, it sounds like this change makes it regenerate on each login, not just each boot. I can understand why someone might think that `echo foo > /etc/motd` followed by a login would then print 'foo', given the current manpage. But they certainly wouldn't expect that it would still print 'foo' after a reboot unless the break the symlink (and breaking the symlink fixes the author's complaint).

~~~
pnathan
Why are we blaming the 'victim' instead of enabling a solution?

A comment in the Description area that runs along these lines would have made
the entire question a non-starter:

If /etc/motd is a non-symlinked file, regeneration will not occur.

~~~
eridius
Manpages for specific utilities really should not be reiterating basic unix
knowledge (e.g. that piping data to a file via the shell > operator doesn't
break symlinks).

~~~
anigbrowl
How else are new users supposed to find out? Man pages are often poorly
written and unhelpful. Indeed, calling the utility 'man' instead of 'help' is
unhelpful.

~~~
alexchamberlain
You have got to be kidding! Man pages are amazing - often you can figure out
what is going on or what niche switch you want to use much quicker with a man
page than Google.

~~~
anigbrowl
These assertions are not mutually exclusive.

~~~
PotatoEngineer
I agree; I use Linux infrequently, and I've always found the man pages to be
chock-full of details on how to use particular switches, but lacking in
examples. I usually have to read them very closely just to get to the point of
"look, I just want the basic usage on this tool so I can do X, the thing the
tool is made for, rather than X -q -m -p."

------
baughj
Author here, I thought I'd respond to a few things.

I tend to write posts on my blog in a particular style. It tends to run
towards bombastic, deliberately, for effect. My point with this entire post
was more how something simple can unravel into a deep hole, and how, in
particular, I hate the way Ubuntu does many, many things. It's not that I hate
change: I hate non-obvious change.

I often don't write posts as a systems administrator might approach something
(my main complaints about honeycomb, as an example, were more focused on how
an average user might interact with it as opposed to, say, me - I was just
annoyed), and I tend to like to turn over rocks and see what is underneath. My
post serves to relay an experience, rather than plead for help, or whine, if
that makes any sense at all.

I should have titled the post better, admittedly. And for the record, I don't
hate Ubuntu. Or Unix. Or Linux. I've been using them in various iterations for
fifteen years. Try not to read so much into a rant written mostly to amuse a
few of my friends.

~~~
unwind
I guess the root confusion is whether or not you expected the equivalent of
_echo "foo" > /etc/motd_ to replace the symlink with a new file containing
"foo", or not.

Or if the symlink semantics just weren't something you considered at this
point, which lead you to keep hunting.

~~~
baughj
The post is more about having the reasonable expectation that editing
/etc/motd is sufficient to change the motd. It isn't. It's not that I didn't
notice it's a symlink, or that I couldn't have just removed the symlink. The
issue is more that a reasonable expectation unfolds exponentially into (what I
consider to be) a surprising amount of ridiculousness. That is the point of
the rabbit hole post.

------
angusgr
_EDIT_ : OK, I misunderstood. That paragraph is there even in the original
blog post, but the author didn't pick up how to get their desired behaviour
until they read the code. Also, there's the "boot time regen" vs "login time
regen" change between Debian & Ubuntu.

It's hard to say in retrospect how obvious that clause is, but there's no
reason the original author couldn't have raised a bug with Debian saying they
didn't understand the man page, and can Debian please add another sentence
saying "To have a static motd, delete the /etc/motd symlink and replace it
with a plain text file." Ranting won't make it better, but a polite suggestion
might.

Ditto raising a suggestion with Ubuntu about replacing "boot time" with "login
time" in their manpage.

\---

Except from the motd man page on Ubuntu oneiric:

 _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._

I can see the original author's frustration, but I got to the end of the post
and thought "why didn't he submit a bug report mentioning the motd man page
needed updating?"

Yes, this was a mistake in Ubuntu. Nevertheless, it didn't seem like one that
the Ubuntu developers would be unwilling or incapable of fixing. In fact, lo
and behold, it has been fixed!

I can see there's a broader point here in general, regarding the philosophy of
"change vs not-change." However, that point doesn't seem to necessitate quite
so much nerdrage.

~~~
Someone
_"On Debian GNU/Linux this file is a symbolic link pointing to /var/run. The
contents of this file"_

That second 'this file' is ambiguous. I think the
grammatically/semantically/whateveryoucallitally best interpretation (by a
tiny margin) would be that both 'this file' would talk about the same file,
but I am not sure, and I think that, in the real world, that is the incorrect
interpretation.

------
imurray
I regularly have to recompile a couple of Ubuntu packages after excising
undocumented junk. I really should submit a patch with a c̶o̶n̶f̶i̶g̶
̶f̶i̶l̶e̶ g̶c̶o̶n̶f̶ dconf option that does the same. But for now I haven't
found the time and tell myself that at least I _can_ comment out the junk code
and recompile on Ubuntu.

Incidentally, to disable _all_ chatter at login (as documented in man login,
and it actually still works in Ubuntu 11.10):

    
    
        touch ~/.hushlogin

~~~
fjarlq
By the way, your attempt at striking out "config file gconf" looks bad on
Chrome running on Windows 7 -- every letter is followed by a box. Looks fine
on OSX Chrome though.

~~~
imurray
Thanks. It works in Ubuntu (Chrome or Firefox).

Playing with: <http://ipinfo.info/netrenderer/index.php> it seems that
Internet Explorer won't display the strikeout characters because the font on
HN is set to Verdana, which doesn't have the combining character. If I create
a page without specifying the font, it works fine.

I have Verdana on my system, but the browsers and font libraries I have
installed mean that the glyph is taken from another font when one is missing.
I'm surprised Windows 7 browsers don't do the same. Or maybe you don't have
the glyph in _any_ font, which would also be disappointing.

Of course, a real webpage would use <strike> or CSS, and strikeouts are
usually poor typography anyway, except as part of lame jokes. But other
unicode combining-characters can be of real use.

------
docgnome
Maybe I'm confused but on my Debian system this works _exactly_ as expected.
Yes /etc/motd is a symlink to /var/run/motd and removing said symlink, or
replacing it with something causes either the new message to show or there to
be no motd. Is the author just confusing Debian and Ubuntu or am I missing
something? Why do people keep doing this? Just because Ubuntu behaves in a
specific way does not mean that Debian behaves the same.

~~~
dlitz
It also works as expected on Ubuntu. The main difference is that /var/run/motd
is generated on each login, rather than only on boot, but that's irrelevant to
the author's problem.

------
dredmorbius
Color me mildly unsure of footing, but wouldn't Debian's policy restriction of
the system automatically overwriting user-modified files turn this issue into
a bug?

~~~
alexchamberlain
Not if it is documented to be a symlink and the user should edit motd.tail
instead.

------
albertzeyer
If you want to have a static /etc/motd and if you see that /etc/motd is a
symlink to something in /var/run, wouldn't it be the straightforward way to
just make /etc/motd a regular file instead?

Despite that, I wonder a bit, who is really manually editing that file by
hand?

~~~
jff
Many employers require a usage notice in the motd, stating that this computer
is public property, unauthorized use will be prosecuted, blah blah. So I have
to edit motd by hand, or at least edit the motd in some fashion.

------
bitwize
Scumbag Debian making Unix not work right since the 90s.

I can't tell you how many straightforward Unix configuration things -- network
interfaces, resolv.conf, initscripts, etc. just plain can't be edited on a
Debian or Ubuntu system except through Debian-specific tools because if you
do, the Debian-spoecific tools will clobber your changes and/or other Debian-
specific things won't work right.

This is why I use Arch. It's like everything I could want out of a Linux: the
simplicity of Slackware, the completeness of Debian (if not quite as huge as
Debian without the AUR), the rolling release schedule of Gentoo.

~~~
jeltz
What does Debian have to do with update-motd? As far as I know Debian does not
do anything particularly funky with the motd. On my Debian testing computer it
is a symlink to /var/run/motd which is a static file generated at boot.

This specific instance of pointless complexity seems to be almost only the
work of of Ubuntu.

~~~
pyre
The parent is probably using this as an excuse to rail on things like the
auto-generated config files that can't be edited directly (e.g. the grub/grub2
config files).

------
alexchamberlain
It amused me slightly you hadn't "ls"d /etc/motd and discovered the symlink
straight away (of course, ls is aliased to ls -la)

------
peterwwillis
Wow. That's a lot of frustration when you could just run

    
    
      /bin/rm -f /etc/motd
      touch /etc/motd
      chattr +i /etc/motd

~~~
jdpage
Except for the fact that he didn't know to do that because the documentation
was incorrect. Not even merely omitting it -- no, directly contradicting the
behaviour. To find out to do as you say, he had to read the Ubuntu-specific
patches to the source code of the package. That is broken.

~~~
rdtsc
The man page is outdated. " _Fuck you Ubuntu, I am switching my OS and
bitching to the whole world about._ "

Then when they are in BSD, or Arch, it will be "Fuck you Arch" you don't have
this man page right, I am switching OS again and bitching to the whole world
about it.

Yeah I don't hear a lot of people complain about Arch and BSD and other
"canonical" *nix systems. But it not because they are flawless, but because
few people are using them compared to RHEL,CentOS and Ubuntu flavors.

Another way to look at it, if motd man page is what people are now mainly
complaining about when it comes to Ubuntu, Ubuntu is doing great.

~~~
fakeempire
Actually OpenBSD does have nearly flawless documentation.

It has other issues but documentation isnt one of them.

~~~
getsat
They actually consider documentation errors to be as serious as bugs.

------
smlacy
sudo apt-get remove update-motd

~~~
imurray
Not in Ubuntu 11.10:

% apt-cache show update-motd

 _...Description-en: superceded by pam_motd in libpam-modules_

 _...The functionality formerly provided by this package is now integrated
into pam_motd, in libpam-modules._

------
freehunter
I'm getting sick of people complaining that Ubuntu keeps changing things.
_That's what Ubuntu does!_ They've done that since the beginning! Oh, they've
changed the software manager, oh they've changed desktop environments, oh they
changed the theme color... stop complaining and switch to something else.

If you're looking for stability and steadfastness, you probably shouldn't be
using a distro with a 6 month major release cycle. Things change, things get
broken, and if you don't know that about Ubuntu by now, you're doing it wrong.

~~~
alxp
Just change the documentation at the same time as you change a feature. That's
all the author expected. Not doing that makes you a bad developer.

~~~
freehunter
Maybe so, but issues like this are common in Ubuntu-land. Some people like
that. Some don't. They're well-known for releasing new features that are
broken and poorly documented. Usually they are fixed in the next release. This
happens all the time, and complaining about it every time just gets old.

~~~
mquander
Bullshit. There are no "some people" who "like that" when Ubuntu does not
update documentation to reflect the changes they have made to core
functionality. That doesn't make any sense.

------
cbs
Did your little hissy fit feel good? I hope so, because other than "software
should never ever change, doubly so if the documentation isn't updated" I got
absolutely nothing from that post.

An update changed something, the documentation didn't have the answer so you
checked with the source. Welcome to linux. Actually, welcome to the world of
software.

Did you at least submit a bug report?

~~~
Karunamon
>I hope so, because other than "software should never ever change, doubly so
if the documentation isn't updated" I got absolutely nothing from that post.

Seeing as how I share, almost verbatim, the author's rage, allow me to break
it down into a sentence or two:

What _possible_ benefit was there from overcomplicating the bloody MOTD file?
I don't see anything but complexity for complexity's sake.

~~~
nknight
I happen to like being informed, when I SSH into my server, that there are
some package updates available.

I happen to like a quick status check popping up for me to either look at or
just ignore at my pleasure, especially since 99% of the time, the first thing
I do when I log into a server is do exactly the sort of status check available
in the Ubuntu MOTD.

There are benefits. That you don't consider them worthwhile is fine, but you
don't need to go apoplectic about it.

~~~
moe
That's a valid concern - but then by all means make it an _optional package_.
Linux is modular, there is absolutely no reason to mess with core-stuff like
that and not provide a simple way to revert to normal.

~~~
nknight
My point is, who are you to decide how "Linux" is _supposed_ to behave by
default? Why do you get veto power over what should be "optional"?

A choice has been made for Ubuntu's behavior. Other distributions are free to
make their own choices. If you find Ubuntu's choice disagreeable, you can file
a bug and try to change it, or you can change it for yourself on your own
system, or you can just live with it, or you can change distributions. You can
even fork Ubuntu and make just this change, if you like. You do have that
choice.

Getting mad because Ubuntu's choices are different from choices you might make
is just silly.

~~~
moe
_who are you to decide how "Linux" is supposed to behave by default?_

I'm not deciding that, other people made those decisions decades ago. It's a
bad idea to mess with defaults for no good reason and then being too lazy to
at least package it properly.

 _Getting mad because Ubuntu's choices are different from choices you might
make is just silly._

I couldn't care less about ubuntu, I'm not using it. I just hate to see that
mindless crap trickle down into one of the last semi-sane distros (debian).
This only leads to forks in the future which means more work for everybody.

Again: If some distro-maintainer wants a fancy motd then great, make it a
package and make that package the default for the desktop-install. Don't mess
with core-stuff that has stood the test of time since before said maintainer
was even born. Down that path lies SuSE linux.

~~~
nknight
> _other people made those decisions decades ago._

This isn't decades ago, and Ubuntu is not Unix. It is Ubuntu. Decisions made
decades ago for Unix are not inherently right, and have no special moral
authority.

> _I couldn't care less about ubuntu, I'm not using it._

Then perhaps you shouldn't speak on the subject. /etc/motd is the least of the
things they've "messed with".

Trying to treat a modern operating system as if it's a 1970s operating system
is absurd.

> _Down that path lies SuSE linux._

There is nothing inherently wrong with SuSE. I don't happen to use it, but
there are a lot of things I don't happen to use.

You're stuck in the past. A Unix-centric past, at that. If it works for you,
great, but don't pretend we all have to stay there with you.

~~~
moe
Not sure what more to say beyond a good old quote; Those who don't understand
history are destined to repeat it.

------
shtylman
This post just stems from the fact the user did not know how to do something.
This has very little to do with an updated motd or the very unrelated bzr
branch he had to get. Don't like it? use something else. The time you wasted
writing this post was probly greater than the time wasted finding the
solution.

~~~
Cloven
This could possibly be the dumbest reply ever on HN.

The motd file, by convention, is displayed whenever you log in to a Unix box.
It has been this way for longer than you have been alive.

There is no question of 'use something else'. There is no app store for
alternatives to /etc/motd. There is no dialog box that pops up that asks you
what alternative to motd you would like to see.

The standard unified method for determining what a system file is composed of
is called 'man'. This has also been around since long before you were alive.
The author demonstrated correctly through the use of this tool that the ubuntu
system for displaying the motd is (a) needlessly overcomplicated, (b) totally
broken, and maybe most importantly (c) at odds with its documentation.

Please log out of the internet.

~~~
cbs
_There is no question of 'use something else'._

So, what you're saying is that this new motd system is some seriously
_disruptive technology_? Good on those ubuntu kids, showing us all how its
done.

~~~
cube13
What benefit is there from changing functionality that's worked for decades
and not documenting it? This is core Ubuntu functionality that they changed,
and they did not document it.

It's not disruptive. It's just idiotic.

