From owner-freebsd-questions Mon Mar 31 19:08:14 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA02956 for questions-outgoing; Mon, 31 Mar 1997 19:08:14 -0800 (PST) Received: from cs.iastate.edu (cs.iastate.edu [129.186.3.1]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA02946 for ; Mon, 31 Mar 1997 19:08:03 -0800 (PST) Received: from popeye.cs.iastate.edu (popeye.cs.iastate.edu [129.186.3.4]) by cs.iastate.edu (8.7.4/8.7.1) with ESMTP id VAA02109; Mon, 31 Mar 1997 21:07:50 -0600 (CST) Received: from localhost (ghelmer@localhost) by popeye.cs.iastate.edu (8.7.4/8.7.1) with SMTP id VAA13914; Mon, 31 Mar 1997 21:07:50 -0600 (CST) X-Authentication-Warning: popeye.cs.iastate.edu: ghelmer owned process doing -bs Date: Mon, 31 Mar 1997 21:07:49 -0600 (CST) From: Guy Helmer To: Anton Zykov cc: freebsd-questions@freebsd.org Subject: Re: delete a user In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Mon, 31 Mar 1997, Anton Zykov wrote: > I'm confused. > I tried to delete a user. 2 days later I wanted to create another user > with the same name, but I've got an error message saying that the user > with that name already exists. How I can delete the user permanently? Never edit /etc/passwd or /etc/master.passwd directly; use vipw(8), which properly locks the password file and rebuilds /etc/passwd, /etc/pwd.db, and /etc/spwd.db after you are finished editing. To automate the task of removing a user, I have written a utility [rmuser(8)] that is included in FreeBSD 2.2 and later; for prior FreeBSD systems, you can pick up essentially the same script at ftp://ftp.cdrom.com/pub/FreeBSD/incoming/removeuser2.tar.gz Guy Helmer, Computer Science Grad Student, Iowa State - ghelmer@cs.iastate.edu http://www.cs.iastate.edu/~ghelmer