Unix Admin Horror Story Summary (1992)
I posted this horror story before, with a link to Pete &quot;Gymble Roulette&quot; Cottrell&#x27;s infamous contest at the end (which I wasn&#x27;t supposed to tell anyone outside of UMD CS Dept staff about):<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15802533" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15802533</a><p>Pyramid&#x27;s OSx version of Unix (a dual-universe Unix supporting both 4.xBSD and System V) [1] had a bug in the &quot;passwd&quot; program, such that if somebody edited &#x2F;etc&#x2F;passwd with a text editor and introduced a blank line (say at the end of the file, or anywhere), the next person who changed their password with the setuid root passwd program would cause the blank line to be replaced by &quot;::0:0:::&quot; (empty user name, empty password, uid 0, gid 0), which then let you get a root shell with &#x27;su &quot;&quot;&#x27;, and log in as root by pressing the return key to the Login: prompt. (Well it wasn&#x27;t quite that simple. The email explains.)<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Pyramid_Technology" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Pyramid_Technology</a><p>Here&#x27;s the email in which I reported it to the staff mailing list.<p><pre><code>    Date: Tue, 30 Sep 86 03:53:12 EDT
    From: Don Hopkins &lt;don@brillig.umd.edu&gt;
    Message-Id: &lt;8609300753.AA22574@brillig.umd.edu&gt;
    To: chris@mimsy.umd.edu, staff@mimsy.umd.edu,
            Pete &quot;Gymble Roulette&quot; Cottrell &lt;pete@mimsy.umd.edu&gt;
    In-Reply-To: Chris Torek&#x27;s message of Mon, 29 Sep 86 22:57:57 EDT
    Subject: stranger and stranger and stranger and stranger and stranger

       Date: Mon, 29 Sep 86 22:57:57 EDT
       From: Chris Torek &lt;chris@mimsy.umd.edu&gt;

       Gymble has been `upgraded&#x27;.

       Pyramid&#x27;s new login program requires that every account have a
       password.

       The remote login system works by having special, password-less
       accounts.

       Fun.

    Pyramid&#x27;s has obviously put a WHOLE lot of thought into their nifty
    security measures in the new release. 

    Is it only half installed, or what? I can&#x27;t find much in the way of
    sources. &#x2F;usr&#x2F;src (on the ucb side of the universe at lease) is quite
    sparse. 

    On gymble, if there is a stray newline at the end of &#x2F;etc&#x2F;passwd, the
    next time passwd is run, a nasty little &quot;::0:0:::&quot; entry gets added on
    that line! [Ye Olde Standard Unix &quot;passwd&quot; Bug That MUST Have Been Put
    There On Purpose.] So I tacked a newline onto the end with vipw to see
    how much fun I could have with this....

    One effect is that I got a root shell by typing:

    % su &quot;&quot;

    But that&#x27;s not nearly as bad as the effect of typing:

    % rlogin gymble -l &quot;&quot;

    All I typed after that was &lt;cr&gt;:

    you don&#x27;t hasword: New passhoose one new
    word: &lt;cr&gt;
    se a lonNew passger password.
    word: &lt;cr&gt;
    se a lonNew password:ger password.
    &lt;cr&gt;
    Please use a longer password.
    Password: &lt;cr&gt;
    Retype new password: &lt;cr&gt;
    Connection closed

    Yes, it was quite garbled for me, too: you&#x27;re not seeing things, or on
    ttyh4. I tried it several times, and it was still garbled. But I&#x27;m not
    EVEN going to complain about it being garbled, though, for three
    reasons: 1) It&#x27;s the effect of a brand new Pyramid &quot;feature&quot;, and
    being used to their software releases, it seems only trivial cosmetic,
    comparitivly.  2) I want to be able to get to sleep tonight, so I&#x27;m
    just going to pretend it didn&#x27;t happen. 3) There are PLEANTY of things
    to complain about that are much much much worse. [My guess, though,
    would be that something is writing to &#x2F;dev&#x2F;tty one way, and something
    else isn&#x27;t.]  Except for this sentence, I will also completely ignore
    the fact that it closed the connection after setting the password, in
    a generous fit of compassion for overworked programmers with
    ridiculous deadlines.

    So then there was an entry in &#x2F;etc&#x2F;passwd where the ::0:0::: had been:

    :7h37OHz9Ww&#x2F;oY:0:0:::

    i.e., it let me insist upon a password it thought was too short by
    repeating it. (A somewhat undocumented feature of the passwd program.)
    (&quot;That&#x27;s not a bug, it&#x27;s a feature!&quot;)

    Then instead of recognizing an empty string as meaning no password,
    and clearing out the field like it should, it encrypted the null
    string and stuck it there. PRETTY CHEEZY, PYRAMID!!!! That means
    grepping for entries in &#x2F;etc&#x2F;passwd that have null strings in the
    password field will NOT necessarily find all accounts with no
    password. 

    So just because I was enjoying myself so much, I once again did:

    % rlogin gymble -l &quot;&quot;

    Password: &lt;cr&gt;
    [ message of the day et all ]
    #

    Wham, bam, thank you man! Instead of letting me in without prompting
    for a password [like it should, according to everyone but pyramid], or
    not allowing a null password and insisting I change it [like it
    shouldn&#x27;t, according to everyone but pyramid], it asked for a
    password. I hit return, and sure enough the encrypted null string
    matched what was in the passwd entry. It was quite difficult to resist
    the temptation of deleting everyone&#x27;s files and trashing the root
    partition.

        -Don

    P.S.: First one to forward this to Pyramid is a turd.
</code></pre>
P.P.S.: The origin story of Pete&#x27;s &quot;Gymble Roulette&quot; nick-name is here:<p><a href="http:&#x2F;&#x2F;art.net&#x2F;~hopkins&#x2F;Don&#x2F;text&#x2F;gymble-roulette.html" rel="nofollow">http:&#x2F;&#x2F;art.net&#x2F;~hopkins&#x2F;Don&#x2F;text&#x2F;gymble-roulette.html</a><p>The postscript comment was an oblique reference to the fact that I&#x27;d previously gotten in trouble for forwarding Pete&#x27;s hilarious &quot;Gymble Roulette&quot; email to a mailing list and somehow it found its was back to Pyramid. In my defense, he did say &quot;Tell your friends and loved ones.&quot;)