From owner-freebsd-questions Tue Nov 27 19:12:30 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ren.sasknow.com (ren.sasknow.com [207.195.92.131]) by hub.freebsd.org (Postfix) with ESMTP id 1A40737B405 for ; Tue, 27 Nov 2001 19:12:25 -0800 (PST) Received: from localhost (ryan@localhost) by ren.sasknow.com (8.9.3/8.9.3) with ESMTP id VAA90858; Tue, 27 Nov 2001 21:12:21 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Tue, 27 Nov 2001 21:12:21 -0600 (CST) From: Ryan Thompson To: Lee Mark Mercado Cc: freebsd-questions@FreeBSD.ORG Subject: Re: passwd In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Lee Mark Mercado wrote to freebsd-questions@FreeBSD.ORG: > is there a way that a user could change their user-password > without logging into telnet ? like: thru a form on a webpage ? > > any ideas will greatly help. Not all my users now about telnet and > i was thinking that a website form for changing password might be > easier for them. Sure... There are a few ways to do this. If your passwords are stored in a UNIX passwd database (i.e., /etc/spwd.db), it's not as easy as you might think, to change passwords over the web. If you're stuck using the passwd database, there isn't a trivially straightforward way to get the job done that I'm aware of. I have had good success, however, using the expect programming language (from ports) in conjunction with su(1) and passwd(1), running as a CGI script. The rest is just chat script logic that parses the various inputs and outputs from passwd(1) in an "interactive" way, and returns appropriate status to the user. If you (or others) are interested, I may be able to blow the dust off of that script. Hope this helps, - Ryan > thx > -Lee > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- Ryan Thompson Network Administrator, Accounts SaskNow Technologies - http://www.sasknow.com #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2 Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message