Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 2003 10:24:12 +0000
From:      Marc Silver <marc.silver@uk.easynet.net>
To:        Jon Reynolds <jonr@destar.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: removing all users
Message-ID:  <20030205102412.GP88454@uk.easynet.net>
In-Reply-To: <1044401515.1511.83.camel@localhost.localdomain>
References:  <1044401515.1511.83.camel@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030205102412.GP88454>