Subject: Re: What prints "you don't exist, go away?"

From: "James A. Robinson" <[email-masked]>
Date: Mon, 08 Jul 1996 17:28:39 -0400

> have been funnier :-), but we should fix it. I think part of the problem
> is GNU libc getpwent(). What is printing the "Go away!" message?

According to "strings /sbin/*|grep "Go away", bin/shutdown is printing
it out.  Perhaps when it thinks the passwd is munged?

Jim

---

From: "Peter Tobias" <[email-masked]>
Date: Mon, 8 Jul 1996 23:25:08 +0200 (MET DST)

Bruce Perens wrote:
> Richard Stallman's 0.93R6 laptop locked him out of the system, and printed
> "You don't exist. Go away!". If we had done this deliberately it couldn't

shutdown. It just tries to verify (getpwuid) that there is a valid passwd
entry for the current user. dip and talk do similar things (and print
the same message).

> 2. The program that handles C-M-DEL should not check the passwd file
> in any way before it reboots, so that an invalid passwd file cannot
> prevent rebooting.

That might be a problem. I think the /etc/shutdown.allow feature needs
a correct passwd file.

> 3. The error message "You don't exist. Go away!" should be changed to
> something sober and informative.  Having humor in the operating system
> is good, but not if it misleads people, especially at times when
> something is very wrong and users are feeling anxious.

Changing one of the oldest unix messages? Hmm... :-))

> 4. The telnet and rlogin servers should accept connections without
> checking /etc/passwd in any way, so that an invalidity does not prevent
> getting a telnet or rlogin connection.

That's not possible for rlogind, it has to check the passwd file
because of the rcmd function (.rhosts file). The telnet daemon doesn't
use the /etc/passwd. It calls /bin/login which does the login stuff.

Thanks,

Peter

-- 
 Peter Tobias                                EMail:
 Fachhochschule Ostfriesland                 [email-masked]
 Fachbereich Elektrotechnik und Informatik   [email-masked]
 Constantiaplatz 4, 26723 Emden, Germany     [email-masked]

---

From: [email-masked] (Bruce Perens)
Date: Sun, 7 Jul 96 14:49 PDT

Bruce

From: Richard Stallman <[email-masked]>

When I was about to leave on this trip, my laptop running Debian [0.93R6] was
thoroughly wedged.  It would boot normally, but it did not allow login
under any name that we tried (including root).  When I tried to log
in, it asked for a password (I am not supposed to have a password).
It did not accept telnet or rlogin connections at all.  And when I
typed C-M-DEL to reboot, it did not reboot; instead it said, "You
don't exist. Go away!"

I thought someone had done this deliberately as a rather nasty hack.
The message printed in response to C-M-DEL had that kind of tone.

But it turned out that all these problems were the consequence of a
couple of garbage lines in /etc/passwd.  Almost all the normal
contents of /etc/passwd seemed to be present, including the line for
root and the line for rms, but there was garbage too.  Installing
an unclobbered passwd file made all the problems stop.

It's not the system's fault (as far as I know) that garbage got put in
/etc/passwd, but its response was disasrous.  At least four changes
are called for:

1. The login program should simply ignore *any* malformed line in
/etc/passwd.  Adding such a line, or lines, should never interfere
with logging in using the accounts described by the other valid lines.

The two garbage lines consist of two parts of a line that ought to be
present.  That line is this:

vjrv:fv.yx7ckYEcwc:9363:11:James Van Artsdalen:/home/gp2/jrv:/usr/local/gnubin/bash

The two garbage lines were:

Artsdalen:/home/gp2/jrv:/usr/local/gnubin/bash
vjrv:fv.yx7ckYEcwc:9363:11:James Van

The former was at the beginning, and the latter was where the
whole vjrv line should have been.

The latter one did not end in a space; it is peculiar that the space
originally there did not end up in either of the two partial lines.

--
                       Re-Elect Clinton/Gore '96

Bruce Perens AB6YM          [email-masked]            http://www.hams.com/

---

From: Mark Eichin <[email-masked]>
Date: 09 Jul 1996 02:00:50 -0400

I didn't that "go away" was in any library -- but was part of "mh"
which gave the error when getpwuid fails. Ie. if you log in, but the
mh program can't get your username and /etc/passwd (or nis I guess)
entry based on your uid, MH programs (inc in particular) will say "go
away".  "talk" might also, under different circumstances...

( side note: Last time I looked into this, under 4.2bsd, rcs would
just dump core. That's been fixed. MH was deemed obnoxious, but I
guess that *hasn't* been fixed... )

---

From: [email-masked] (Wichert Akkerman)
Date: Tue, 9 Jul 1996 12:21:49 +0200 (METDST)

Hello there!

:-> is GNU libc getpwent(). What is printing the "Go away!" message?

I've got no idea. Have you tried `grep -l "Go away" /lib/* /sbin/* /usr/lib/*"?

:-> 1. The login program should simply ignore *any* malformed line in
:-> /etc/passwd.  Adding such a line, or lines, should never interfere
:-> with logging in using the accounts described by the other valid lines.

If I'm not mistaken login relies on the getpwnam() function in libc, so
the problem is probably libc-related.

:-> 2. The program that handles C-M-DEL should not check the passwd file
:-> in any way before it reboots, so that an invalid passwd file cannot
:-> prevent rebooting.

The shutdown as supplied with sysvinit checks which users are working at
the console to prevent unauthorized users from rebooting the system, so
checking the account is necessary. Of course we can start a discussion on
wether this is a usefull option for init..

:-> 3. The error message "You don't exist. Go away!" should be changed to
:-> something sober and informative.  Having humor in the operating system
:-> is good, but not if it misleads people, especially at times when
:-> something is very wrong and users are feeling anxious.

sudo is great for humer (`where did you learn to type?'), but I agree that
errors should always tell what's wrong.

:-> 4. The telnet and rlogin servers should accept connections without
:-> checking /etc/passwd in any way, so that an invalidity does not prevent
:-> getting a telnet or rlogin connection.

See 1.

Grzt,
  Wichert.

---

From: Miquel van Smoorenburg <[email-masked]>
Date: Tue, 9 Jul 1996 12:45:10 +0200 (MET DST)

> is GNU libc getpwent(). What is printing the "Go away!" message?

Oh, shutdown prints it. Sorry ;). A lot of Unix programs have the following
code in it:

  if ((pwd = getpwuid(getuid())) == NULL) {
	fprintf(stderr, "You don't exist. Go away.\n");
	exit(1);
  }

I don't know why but I took over the habit. The suit-and-tie code would be

"Your userid (%d) couldn't be mapped to a name in the password file", getuid()

but I like this more.. And I also want the "lp1 on fire" message back
in the kernel ! :)

Anyway I've fixed it not to complain if (getuid() == 0).

> something is very wrong and users are feeling anxious.

Well. I'm glad he didn't log in as "tyler". Read "dowall.c" to see why :) :)

Mike.
-- 
  Miquel van    | Cistron Internet Services   --    Alphen aan den Rijn.
  Smoorenburg,  | mailto:[email-masked]          http://www.cistron.nl/
[email-masked] | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)

---

From: [email-masked] (Kai Henningsen)
Date: 10 Jul 1996 09:47:00 +0200

> Changing one of the oldest unix messages? Hmm... :-))

Just make it longer. First explain what went wrong, then give the original  
message in the next line.

MfG Kai

---

From: Lars Wirzenius <[email-masked]>
Date: Thu, 11 Jul 1996 08:03:55 +0300

[ NB: I read the list.  Don't CC replies to me.  I pay for my PPP.  Thanks ]

> errors should always tell what's wrong.

mailstat from procmail is also fun.

	$ mailstat
	Most people don't type their own logfiles;  but, what do I care?
	$ 
	
The usual Unix way, of course, is to just sit silently in that case.