An example of Unix's slow fossilization

December 13, 2006

If you walk up to the console of some Linux machines that have their capslock turned on and try to log in, an interesting thing happens:

keyx login: CKS

(This works with Ubuntu 6.06, but not with Fedora Core 6.)

Why does this happen?

Once, long ago, there were terminals that only did upper case, and there were people who wanted to connect them to Unix systems. So Bell Labs put a very special hack into getty: if it saw a login name that was all in upper case, it assumed that you were using such a terminal, lower-cased the name, and set a special terminal mode where lower case was converted to upper case on output and upper case converted to lower case on input.

(Of course this doesn't work very well if your password has any actual upper-case characters. Or your username, or the names of your files, or any command options, or etc etc. People who needed this hack were presumably going to avoid all of that.)

It has probably been at least twenty years since such a terminal was connected to a Unix system. In all that time, very few people removed this feature, and so it lurks around many systems to this day. Including systems reimplemented from scratch, where people can't even claim that it was less work to leave old code alone instead of removing it.

(To be fair, this seems to have been removed from the latest version of the Single Unix Specification. Also, FreeBSD and OpenBSD seem to not support 'stty lcase', although Linux does, which I find ironic.)

Written on 13 December 2006.
« A SMTP implementor's conundrum
Fedora Core's memory problem »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Wed Dec 13 22:03:53 2006
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.