Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Dec 2000 11:58:19 +0000
From:      Jamie Heckford <heckfordj@psi-domain.co.uk>
To:        Daniel <daniel@albanyis.com.au>
Cc:        freebsd-isp@freebsd.org
Subject:   Re: Change password via web
Message-ID:  <0012071209470B.03569@freefire.psi-domain.co.uk>
In-Reply-To: <5.0.0.25.2.20001207194659.0241cb50@mail.albanyis.com.au>
References:  <5.0.0.25.2.20001207194659.0241cb50@mail.albanyis.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
I did this - took me ages to figure out how ;)

This was my method:-

1. Create a web form, thats asks for there username, current password, new pass,
verify new pass.

2. Have there current password verified against a MySQL database with a perl
script.

3. If ok, drop there new password into a plain text file with the format
username,password \n . Have a seperate plain text file that will have there new
password in a SQL UPDATE statement in, say, newpass.sql

4. Every ten minutes, have another perl script on cron process the plain text
files.

Process the MySQL with something like "mysql -upass -padmin passworddb <
/var/passtmp/newpass.sql

Then process the password plain text file, with something like this:

open (UD, "</var/passtmp/newpass-add");
if (!defined UD) {
  print "Fuck! Error!\n\n";
  exit;
}

$passcount = 0;
@PASSCOUNT = "";
while (<UD>) {
 @LINE = split /,/;
 foreach $value (@LINE) {

Put your own hack here :)  

}

I'll give you a clue for updating the passwords with your own hack, and that is
adduser is a perl script ;)

I copied the adduser script and then hacked it to include my own processing for
the web stuff and ran it seperatly.

Have Fun

Jamie

On Thu, 07 Dec 2000, you wrote:
> Hi, i've just started using FreeBSD and i've just started to work at an ISP 
> in my local, and i've been asked to make a web page so that our clients can 
> change their passwords on the web.  Has anyone done this sort of thing 
> before or know of any places i could get reference material from?  Anything 
> would be apperciated.
> 
> 
> Thanks
> 
> 
> Dan
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message
-- 
Jamie Heckford
Chief Network Engineer
Psi-Domain - Innovative Linux Solutions. Ask Us How.

===================================
email:     heckfordj@psi-domain.co.uk
web:	 http://www.psi-domain.co.uk/

tel:	   +44 (0)1737 789 246
fax:	   +44 (0)1737 789 245
mobile:	   +44 (0)7779 646 529
===================================


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0012071209470B.03569>