From owner-freebsd-questions Sun Feb 11 19:14:13 2001 Delivered-To: freebsd-questions@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 7C4EA37B4EC for ; Sun, 11 Feb 2001 19:14:09 -0800 (PST) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id 8C1103E09; Sun, 11 Feb 2001 19:14:08 -0800 (PST) To: jim@freeze.org Cc: questions@freebsd.org Subject: Re: Mysterious user In-Reply-To: Message from jim@freeze.org of "Sun, 11 Feb 2001 19:24:21 EST." <200102120024.TAA08765@CI590846-B.lxintn1.ky.home.com> Date: Sun, 11 Feb 2001 19:14:08 -0800 From: Dima Dorfman Message-Id: <20010212031408.8C1103E09@bazooka.unixfreak.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Nope. The ctrl+d did not close the terminal. > Now I have I'm not sure I really understand your question; are you trying to figure out why this happened, or how to get rid of it? It seems the former has already been answered for you. If you want to get rid of it, there are two ways. The first is to establish enough connections so one ends up on ttyp7, then gracefully close all of them; the second is to compile and run this program, which takes the terminal name as an argument, and removes the corresponding utmp entry (`./progname ttyp7`, for example). Compile it using `gcc -pipe -o whatever whatever.c` (obviously replace whatever[.c] with whatever you called it). Hope this helps Dima Dorfman dima@unixfreak.org /* start whatever.c */ #include #include #include #include int main(int argc, char *argv[]) { if (argc < 2) { printf("Usage: %s \n", argv[0]); return (1); } if (logout(argv[1]) != 1) err(1, "logout"); else printf("utmp entry for %s has been cleared\n", argv[1]); return (0); } /* end whatever.c */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message