From owner-freebsd-hackers Fri Mar 19 14:14:17 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from xylan.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (Postfix) with ESMTP id 4DA45157AE for ; Fri, 19 Mar 1999 14:14:01 -0800 (PST) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com by xylan.com (8.8.7/SMI-SVR4 (xylan-mgw 2.2 [OUT])) id OAA13607; Fri, 19 Mar 1999 14:13:06 -0800 (PST) Received: from utah.XYLAN.COM by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id OAA19635; Fri, 19 Mar 1999 14:13:05 -0800 Received: from softweyr.com by utah.XYLAN.COM (SMI-8.6/SMI-SVR4 (xylan utah [SPOOL])) id PAA14407; Fri, 19 Mar 1999 15:13:02 -0700 Message-ID: <36F2CBE9.1934E6F1@softweyr.com> Date: Fri, 19 Mar 1999 15:12:57 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.5 [en] (X11; U; FreeBSD 3.1-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Joe Schwartz Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: 3.1 adduser -batch gone? References: <199903191938.NAA10411@sierrahill.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Joe Schwartz wrote: > > > Folks, > > I'm migrating an ISP's NT e-mail server to FreeBSD 3.1. They've > provided user info including: > > login ID, full name, passwd > > I've set up the script using my FreeBSD 2.8 system to create the > adduser script which looks like: > > adduser -batch test4 '' '' 'MR. TEST' qwerty7 > > Works great on 2.8 and creates a record like this: > > test4:$1$Yk404UY5$vsmNN4Ah1sLVZyHX.NEok1:1024:15::0:0:MR. TEST:/home/test4:/bin/ > csh. > > > I tried running he script on the 3.1 machine and got a: > > '-batch no longer supported' error message. > > I was originally going to use 'pw', but not not understand > how to use it to set a passwd. Am I overlooking this option? > > HELP, I don't want to do this by hand and could sure use some > advice on how to programatically make these users. Look at the -h option. This prevents you from passing the password on the command line, where it can be viewed by other users. This seems to work entirely adequately: pw useradd foobar -u 2525 -h 0 <