Date: Mon, 16 Jan 2006 22:12:59 -0800 From: Bill Campbell <freebsd@celestial.com> To: freebsd-questions@freebsd.org Subject: Re: how do I (non-interactively) change a users password in a script ? Message-ID: <20060117061259.GB6193@alexis.mi.celestial.com> In-Reply-To: <Pine.LNX.4.21.0601170101390.8684-100000@shell.dhp.com> References: <Pine.LNX.4.21.0601170101390.8684-100000@shell.dhp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 17, 2006, user wrote: > >/bin/sh script. > >Need to change a users password within the script based on a file of >user/pass I am feeding the script. See ``man pw'', in particular the ``-h fd'' option. .. >Except the passwd command does not seem to be able to take a password as >an argument - I don't think that the passwd command can run >non-interactively. You can also use expect which is designed for just this sort of thing. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``Ah, you know the type. They like to blame it all on the Jews or the Blacks, 'cause if they couldn't, they'd have to wake up to the fact that life's one big, scary, glorious, complex and ultimately unfathomable crapshoot -- and the only reason THEY can't seem to keep up is they're a bunch of misfits and losers.'' -- A analysis of Neo-Nazis, from "The Badger" comic
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060117061259.GB6193>