From owner-freebsd-questions Sat Sep 14 6:26:45 2002 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 D76F937B400 for ; Sat, 14 Sep 2002 06:26:43 -0700 (PDT) Received: from blueyonder.co.uk (pcow034o.blueyonder.co.uk [195.188.53.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BC2B43E3B for ; Sat, 14 Sep 2002 06:26:42 -0700 (PDT) (envelope-from m.hill@st-james-snrgirls.w-london.sch.uk) Received: from pcow034o.blueyonder.co.uk ([127.0.0.1]) by blueyonder.co.uk with Microsoft SMTPSVC(5.5.1877.757.75); Sat, 14 Sep 2002 14:25:58 +0100 Received: from rama (unverified [80.194.98.107]) by pcow034o.blueyonder.co.uk (Content Technologies SMTPRS 4.2.9) with SMTP id for ; Sat, 14 Sep 2002 14:25:58 +0100 Message-ID: <000701c25bf5$2d8fa920$f801000a@maya.net> From: "Martyn Hill" To: "Questions FreeBSD" Subject: How do I use the -h option in PW to set passwords fo rnew users Date: Sat, 14 Sep 2002 14:46:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 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 I need to set-up about 200 user accounts under FreeBSD 4.5-RELEASE for the school pupil and staff population. We run Samba-TNG to share files, but need to create the UNIX users first. I intend to run a simple script to create the users with a pre-prepared password. I've looked at PW but can't understand how the -h option is supposed to work for setting initial passwords for new users. How do I specify the "file descriptor" as described in the man page? I've tried creating a file containing the password and specifying: pw adduser ... -h /path_to_file_containing_users_password PW just comes back prompting for the password (interactively.) I've no intention sitting at a terminal feeding in 200 passwords... I've also tried: pw adduser ... -h < `cat /path_to_file_containing_users_password` PW complains "bad file descriptor" or something (I forget, having tried various permutations of pipe commands.) The random password mechanism (-w random) would not be suitable (far too random for our users...) What am I missing (jokes aside, please)? Martyn Hill IT Co-ordinator and Technician St James Independent School London To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message