Date: Sat, 8 Sep 2001 14:13:47 +0200 From: Francesco Casadei <fcasadei@inwind.it> To: Bill Sandiford <sysop@interlinks.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: problem with pw command Message-ID: <20010908141347.A1780@goku.kasby> In-Reply-To: <001d01c137f3$e1fb54d0$0fa06bcf@custinfo>; from sysop@interlinks.net on Fri, Sep 07, 2001 at 07:21:44PM -0400 References: <001d01c137f3$e1fb54d0$0fa06bcf@custinfo>
next in thread | previous in thread | raw e-mail | index | archive | help
--vkogqOf2sHV7VnPd Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 07, 2001 at 07:21:44PM -0400, Bill Sandiford wrote: > I have a script on my machine that calls the pw command. I have been > running this script for 3 years and it has worked fine. I use it to chan= ge > passwords. it uses the pw command in the following syntax >=20 > echo newpass | pw usermod username >=20 > this has worked fine but suddently today it is dropping out with the > following error >=20 > pw: password update: No such file or directory >=20 > I have tried everything I can but can't fix this >=20 > Please help >=20 >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message >=20 > end of the original message =46rom pw(8) manpage: -h fd This option provides a special interface by which interac=AD tive scripts can set an account password using pw. Because the command line and environment are fundamentally insecure mechanisms by which programs can accept information, pw will only allow setting of account and group passwords via a file descriptor (usually a pipe between an interactive script and the program). sh, bash, ksh and perl all pos=AD sess mechanisms by which this can be done. Alternatively, pw will prompt for the user's password if -h 0 is given, nominating stdin as the file descriptor on which to read the password. Note that this password will be read only once and is intended for use by a script rather than for interactive use. If you wish to have new password confir=AD mation along the lines of passwd(1), this must be imple=AD mented as part of an interactive script that calls pw. If a value of `-' is given as the argument fd, then the password will be set to `*', rendering the account inacces=AD sible via password-based login. So you want to do: # echo newpass | pw usermod username -h 0 Francesco Casadei --=20 You can download my public key from http://digilander.iol.it/fcasadei/ or retrieve it from a keyserver (pgpkeys.mit.edu, wwwkeys.pgp.net, ...) Key fingerprint is: 1671 9A23 ACB4 520A E7EE 00B0 7EC3 375F 164E B17B --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7mgt6fsM3XxZOsXsRAsaFAJ4jR6jt45NL4n3vWtv/sJfUALfHhACdEgse F7cRbN8h6eEh5znxfMlrYiE= =/+qz -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd-- 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?20010908141347.A1780>