From owner-freebsd-hackers Tue May 28 9:38:31 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mailbox.univie.ac.at (mailbox.univie.ac.at [131.130.1.27]) by hub.freebsd.org (Postfix) with ESMTP id AF1E937B400 for ; Tue, 28 May 2002 09:38:23 -0700 (PDT) Received: from adslle.cc.univie.ac.at (adslle.cc.univie.ac.at [131.130.102.11]) by mailbox.univie.ac.at (8.12.2/8.12.2) with ESMTP id g4SGcCEP034494; Tue, 28 May 2002 18:38:16 +0200 Date: Tue, 28 May 2002 18:38:12 +0200 (CEST) From: Lukas Ertl X-X-Sender: le@leelou.in.tern To: Jamie Heckford Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Creating Passwords from a perl script In-Reply-To: <024301c20663$2795e8a0$4464a8c0@JAMIEHECKFORD> Message-ID: <20020528183704.E42679-100000@leelou.in.tern> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 28 May 2002, Jamie Heckford wrote: > Im trying to have the passwords on our FreeBSD boxen created by a perl > script. > > Currently... the username/pass pairs are stored in a MySQL database. Easy > enough to get them, but > does anyone know a perl method of creating them in /etc/passwd? I know > getpwent grabs values - im looking for a putpwent if > there is such a thing and in the encrypted password form :) Have a look at pw(8), it has an option "-h" which might by useful in your case. regards, le --=20 Lukas Ertl eMail: l.ertl@univie.ac.at UNIX-Systemadministrator Tel.: (+43 1) 4277-14073 Zentraler Informatikdienst (ZID) Fax.: (+43 1) 4277-9140 der Universit=E4t Wien http://mailbox.univie.ac.at/~le/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message