From: Risto Widenius (widenius@klaava.Helsinki.FI)
Date: 07/14/92


From: widenius@klaava.Helsinki.FI (Risto Widenius)
Subject: Re: /etc/passwd bug
Date: 15 Jul 1992 02:34:57 GMT

In <1992Jul12.013741.2642@amhux2.amherst.edu>
pfcouvar@amhux1.amherst.edu (Peter Couvares) writes:

>difficulties. For some reason, it (I say "it" because I'm not sure which
>program it is exactly that causes this) doesn't like having more than 1 user
>with a UID > 100.
>Here is the /etc/passwd that didn't work (wouldn't let derek log in):

>[root, bin, others all with UID's < 100]
>user::100:1::/home/user:/bin/sh
>peter::101:6:/home/peter:/bin/sh
>derek::102:6:/home/derek:/bin/sh

>by simply changing derek's UID to "9", instead of "102", all my problems were
>solved...suddenly, he was a legitimate user, I could chown /home/derek to
>derek, and he could log in. This wasn't a permission problem I'm sure--I'm
>positive what made the difference was the change of his UID from 102 to 9.
>Is there some limit to a user's UID or is this really the bug I think it is?

This behaviour is easily reproduced, and due to a feature in the 096
rootimage-inbound editor joe. Joe does not add a newline at the end of
the file. If the newline isn't explicitely added, the last passwd entry
is considered corrupt. As a test I wrote a two-line file with both
uemacs and joe, and od'ed them:

klaava% od -c foo.uemacs
0000000 e n t r y 1 \n e n t r y 2 \n
0000016
klaava% od -c foo.joe
0000000 e n t r y 1 \n e n t r y 2
0000015

rw

-- 
risto widenius:widenius@cc.helsinki.fi:inutili terrae pondus:
            the white zone is for loading and unloading only