From owner-freebsd-questions@FreeBSD.ORG Thu May 13 11:35:03 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95E2416A4CE for ; Thu, 13 May 2004 11:35:03 -0700 (PDT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00EA943D41 for ; Thu, 13 May 2004 11:35:03 -0700 (PDT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.7p1+Sun/8.11.7) id i4DIZ0t27249; Thu, 13 May 2004 14:35:00 -0400 (EDT) From: Jerry McAllister Message-Id: <200405131835.i4DIZ0t27249@clunix.cl.msu.edu> To: stein.175@osu.edu (OLAF STEIN) Date: Thu, 13 May 2004 14:35:00 -0400 (EDT) In-Reply-To: <4d01124d0e90.4d0e904d0112@osu.edu> from "OLAF STEIN" at May 13, 2004 02:14:51 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: remove users from system X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2004 18:35:03 -0000 > > hi everybody, > > i recently switched from linux to freebsd, so this question might sound > a little stupid > > the problem > i removed 2 users from my system by deleting their entries in /etc/passwd > and /etc/group (they had their own group and where in no other groups) > > the users are still able to login after i deleted them > the rmuser command now does not remove them anymore because it cannot find > their entries in /etc/passwd, cause as mentioned i deleted them from their > > the handbook lists all actions that are taken, when the rmuser command is > executed and i did all actions manually except the deletion of the home > directories of those users, because i want to keep them > > how can i remove those users completely? > and is there something like a /etc/shadow file? You said you did what rmuser does "manually". I presume that means that you did not use rmuser directly. So, what did you use to delete the entry from the /etc/passwd file? As you have guessed, there is a 'shadow' file (which is called master.passwd). There is also a password database (pwd.db). If you edit /etc/passwd directly, then neither master.passwd nor pwd.db will be correctly updated. So, you need to use a utility called 'vipw'. It is just like using vi. type vipw, do your editing - remove the line from the file - and write/quit to get out. When you leave vipw with a write, it will automatically update master.passwd and pwd.db for you. ////jerry > > please cc me on the answer as i am not in the list Oh, you should be. You would learn so much. /jrm > > thanks in advance > olaf >