From owner-freebsd-isp@FreeBSD.ORG Tue Oct 12 00:31:32 2004 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA14F16A4CE for ; Tue, 12 Oct 2004 00:31:32 +0000 (GMT) Received: from mail.emediaone.net (orion.emediaone.net [203.208.226.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECF4643D39 for ; Tue, 12 Oct 2004 00:31:31 +0000 (GMT) (envelope-from jett@angdatingdaan.org) Received: from mail.emediaone.net (localhost [127.0.0.1]) by mail.emediaone.net (Postfix) with ESMTP id 7C0D245089 for ; Tue, 12 Oct 2004 08:33:43 +0800 (SGT) Received: from mail.angdatingdaan.org (localhost [127.0.0.1]) by mail.emediaone.net (Postfix) with SMTP id 4303645086 for ; Tue, 12 Oct 2004 08:33:43 +0800 (SGT) Received: from devnull.chikka.com ([203.190.72.108]) (SquirrelMail authenticated user jett@angdatingdaan.org) by mail.angdatingdaan.org with HTTP; Tue, 12 Oct 2004 08:33:43 +0800 (SGT) Message-ID: <33061.203.190.72.108.1097541223.squirrel@mail.angdatingdaan.org> In-Reply-To: References: Date: Tue, 12 Oct 2004 08:33:43 +0800 (SGT) From: "Jett Tayer" To: freebsd-isp@freebsd.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-AV-Checked: ClamAV using ClamSMTP Subject: Re: Add/Del users X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2004 00:31:32 -0000 you can use the cut and get just all the users and put it in a file. remove root,nobody,etc... and just leave all the users you want to add cut -d ":" /etc/passwd > /path/to/myusers.file then do a for loop something like: for i in `/bin/cat /path/to/myusers.file` do pw useradd $i done hope this helps! /Jett > > Weve been migrating some our servers from BSD/OS to FreeBSD. Main issue > I'm running into is add/del/changing users. The old app we used under > BSD/OS is not ported to FreeBSD (its a custom C cgi) author long gone, > some of the header files needed to compile said cgi's not around, missing > some source too so a port is out. > > Ive done a simple cgi that calls pw that took me a few days to put > together in my spare time. >