From owner-freebsd-questions Wed Feb 5 2:24:24 2003 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 CD2EB37B4DD for ; Wed, 5 Feb 2003 02:24:13 -0800 (PST) Received: from pressure.noc.uk.easynet.net (pressure.noc.uk.easynet.net [195.40.7.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D5CD43F79 for ; Wed, 5 Feb 2003 02:24:13 -0800 (PST) (envelope-from marc.silver@uk.easynet.net) Received: by pressure.noc.uk.easynet.net (Postfix, from userid 1332) id C9DA36C801; Wed, 5 Feb 2003 10:24:12 +0000 (GMT) Date: Wed, 5 Feb 2003 10:24:12 +0000 From: Marc Silver To: Jon Reynolds Cc: freebsd-questions@FreeBSD.ORG Subject: Re: removing all users Message-ID: <20030205102412.GP88454@uk.easynet.net> References: <1044401515.1511.83.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1044401515.1511.83.camel@localhost.localdomain> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi there, On Tue, Feb 04, 2003 at 02:31:55PM -0900, Jon Reynolds wrote: > Probably a stupid question but.... I have a lot of users on a freebsd > box and I want to remove them all at once. Is there any problem with > just issueing this command in the /home directory: 'rm -i *'. Or is > there a better way to do this? > > Thanks for any suggestions, You could try something like: cd /home/ for i in * ; do /usr/sbin/rmuser -y $i ; done That should do what you're asking for, and will do a lot more than just remove the directories. Man rmuser(8) for more info on what it does if you're interested. :) - Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message