Date: Sat, 14 Sep 2002 14:46:50 +0100 From: "Martyn Hill" <m.hill@st-james-snrgirls.w-london.sch.uk> To: "Questions FreeBSD" <questions@FreeBSD.ORG> Subject: How do I use the -h option in PW to set passwords fo rnew users Message-ID: <000701c25bf5$2d8fa920$f801000a@maya.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000701c25bf5$2d8fa920$f801000a>
