It was just one of these nights. We were sitting at the O’Neil’s San Mateo Pub, taking a break after a long day at the Maker Faire. Hackaday was hosting an informal drink-up and a steady stream of colorful characters has just started flowing in. That’s when we met [Robert Coggeshall].
[xkcd, 149]It started off as a normal discussion – he runs
Small Batch Assemblyand does a lot of interesting things in the maker space. Then he brought up a fascinating detail – “Oh, did you know I also co-invented sudo back in the 80’s?”
If you ever did as much as touch a Unix system, you’ll know this is a big deal. What came as an even bigger surprise was that something like sudo had to be “invented” in the first place. When thinking about the base Unix toolkit, there is always this feeling that it all emerged from some primordial soup of ideas deep inside of Bell Labs, brought to life by the infinite wisdom of [Ken Thompson] and the rest of the gang. Turns out that wasn’t always the case. We couldn’t miss asking [Bob] for an interview, and he told us how it all came about…
The Hack[youtube=https://www.youtube.com/watch?v=LaAwl3HN5ds&w=580]
The story itself is a fairly common one – it starts with a problem and ends with a hack. [Bob] and his colleague [Cliff Spencer] were working at SUNY/Buffalo at the time, and [Bob] was in charge of administration of their Unix infrastructure. Since Unix was a multiuser system from the very beginnings, being a sysadmin meant executing a lot of commands as a superuser. The standard way of doing so was using the “su” command, which enabled user to switch to a superuser mode. While this generally did the trick, it opened a lot of opportunities for human error – it was just too easy to forget you’re in a “root” mode and end up causing inadvertent damage to the system. [Bob] and [Cliff] thought of a better way – instead of constantly switching, why not simply create a tool that enables executing individual commands as a superuser, without changing the actual user id in the shell. They quickly whipped up a hack that combined two standard Posix system calls – setuid() and execvp() in order to achieve such functionality. The command was named “sudo“, short for superuser-do ([Bob] insists that correct pronunciation is /ˈsuːduː/, not /ˈsuːdoʊ/).
Going Open SourceAfter proving to be an indispensable tool in the sysadmin arsenal at SUNY, sudo slowly began to make its way into other research groups and was formally “open sourced” in 1985. In those days Open Source was not yet all the rage (Richard Stallman had just come out with his GNU Manifesto the same year), so the act of “open sourcing” essentially meant posting the source code on the Usenet. And on December 15th, 1985 that’s what they did. [Bob] helped us track down the original message posted to the net.sources group.
There be trollsAnother fascinating historical artifact that can be found in the thread following the original post is an early example of the Internet Troll species:
-- isn't this the same as saying: su -f root -c "some commands here" why reinvent the wheel? plus this doens't have to be recompiled when there is a new root passwd. i find that most unix programs get written again and again and again, when the one you wanted was already there in the first place. tom --
Though it is true that sudo didn’t invent anything fundamentally new, it did something better – it provided an efficient solution to a real problem. And because [Bob] and [Cliff] cared enough to share it with the world, other people happily adopted it and continued to improve. Today sudo counts 9944 lines of code (up from 153 lines in the original release) and is maintained by [Todd C. Miller]. Over 30 years in age, it still continues to receive code contributions and regularly issues new releases.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3