From owner-freebsd-questions@FreeBSD.ORG Tue Jan 17 06:13:01 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 9C01A16A41F for ; Tue, 17 Jan 2006 06:13:01 +0000 (GMT) (envelope-from bill@celestial.com) Received: from mail.mi.celestial.com (dagney.celestial.com [192.136.111.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A97943D49 for ; Tue, 17 Jan 2006 06:12:59 +0000 (GMT) (envelope-from bill@celestial.com) Received: from localhost (localhost [127.0.0.1]) by mail.mi.celestial.com (Postfix) with ESMTP id 8B5431CECD; Mon, 16 Jan 2006 22:12:59 -0800 (PST) Received: from mail.mi.celestial.com ([127.0.0.1]) by localhost (alexis.mi.celestial.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11526-02; Mon, 16 Jan 2006 22:12:59 -0800 (PST) Received: by mail.mi.celestial.com (Postfix, from userid 203) id 3F97B12022D; Mon, 16 Jan 2006 22:12:59 -0800 (PST) Date: Mon, 16 Jan 2006 22:12:59 -0800 From: Bill Campbell To: freebsd-questions@freebsd.org Message-ID: <20060117061259.GB6193@alexis.mi.celestial.com> Mail-Followup-To: freebsd-questions@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: amavisd-new at mi.celestial.com Subject: Re: how do I (non-interactively) change a users password in a script ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@celestial.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2006 06:13:01 -0000 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