From owner-freebsd-questions@FreeBSD.ORG Thu May 13 13:54:08 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 BDE0E16A4CE for ; Thu, 13 May 2004 13:54:08 -0700 (PDT) Received: from server.rucus.ru.ac.za (server.rucus.ru.ac.za [146.231.115.1]) by mx1.FreeBSD.org (Postfix) with SMTP id D77E043D55 for ; Thu, 13 May 2004 13:54:06 -0700 (PDT) (envelope-from oxo@rucus.ru.ac.za) Received: (qmail 28474 invoked from network); 13 May 2004 20:54:04 -0000 Received: from shell-em0.rucus.ru.ac.za (oxo@10.0.0.1) by server-em0.rucus.ru.ac.za with QMQP; 13 May 2004 20:54:04 -0000 Date: Thu, 13 May 2004 22:54:04 +0200 From: John Oxley To: Kent Stewart Message-ID: <20040513205404.GA84510@rucus.ru.ac.za> References: <4d01124d0e90.4d0e904d0112@osu.edu> <200405131131.17085.kstewart@owt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405131131.17085.kstewart@owt.com> User-Agent: Mutt/1.4.2.1i cc: 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 20:54:08 -0000 On Thu 2004-05-13 (11:31), Kent Stewart wrote: > On Thursday 13 May 2004 11:14 am, OLAF STEIN wrote: > > 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? > > > > Use vipw to do the delete. You deleted the text in the shadow text file > and left /etc/master.passwd with the previous working version. You can > force the update of master.passwd but I think you should get used to > using vipw. /etc/passwd is a world readable version on /etc/master.passwd so that no one can see your password hash. editing /etc/passwd is pointless, and editing /etc/master.passwd to delete a user is like using a cannon to kill a mosquito. Use pw userdel -rn username to delete the user from /etc/master.passwd, rebuild the pwd.db, remove him/her from all the groups and kill their homedir. Editing master.passwd is a *VERY* bad idea unless you use vipw, which rebuilds pwd.db so in short, DON'T. Read the man pages for pw, as it is very useful for manipulating users and groups. Hope this helps. -Ox -- /~\ The ASCII ASCII stupid question, get a EBCDIC ANSI. \ / Ribbon Campaign John Oxley X Against HTML http://oxo.rucus.net/ / \ Email! oxo rucus.ru.ac.za "Personally, I'd rather pay for my freedom than live in a bitmapped, pop-up-happy dungeon like NT." -- Thomas Scoville