From owner-freebsd-questions Sun Oct 27 16:44:10 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA29835 for questions-outgoing; Sun, 27 Oct 1996 16:44:10 -0800 (PST) Received: from wawasee.read.indiana.edu (wawasee.read.indiana.edu [149.159.108.2]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id QAA29821 for ; Sun, 27 Oct 1996 16:44:00 -0800 (PST) Received: from localhost (xwin@localhost) by wawasee.read.indiana.edu (8.7.5/8.6.12) with SMTP id TAA25221; Sun, 27 Oct 1996 19:43:30 -0500 (EST) Date: Sun, 27 Oct 1996 19:43:30 -0500 (EST) From: X windows Runner Reply-To: X windows Runner To: Roman Mikus cc: questions@FreeBSD.ORG Subject: Re: remove user In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1631699891-846463166=:25129" Content-ID: Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-1631699891-846463166=:25129 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: > We have a problem with removing users, we don't know command to do it. Attached is a Perl script designed specificly for removing users. (My was saved as /usr/local/sbin/removeuser..) Works quite well.. Author: Guy Helmer ghelmer@alpha.dsu.edu Greg Hormann ghormann@indiana.edu --0-1631699891-846463166=:25129 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=removeuser Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: IyEvdXNyL2xvY2FsL2Jpbi9wZXJsDQojIC0qLSBwZXJsIC0qLQ0KIyBDb3B5 cmlnaHQgMTk5NSwgMTk5NiBHdXkgSGVsbWVyLCBNYWRpc29uLCBTb3V0aCBE YWtvdGEgNTcwNDIuDQojIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQojDQojIFJl ZGlzdHJpYnV0aW9uIGFu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