[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Question about LDAP and password Changes



A little start in php:

It should help you a little bit on the way, look at the php
documentation for more. 
http://no2.php.net/manual/en/ref.ldap.php

<?php
if ($newpass1 == $newpass2) {
	$ds=ldap_connect("ldap://server";);
	if ($ds) {
		$r=ldap_bind($ds, $dn, $password);
	}
	if ($r) {
		Bind sucsessfully, code to change password
		ldap_mod_replace/ldap_modify...
	}
	else {
		Bind unsucsessfully, send some errormessages...
	}
}
else {
	echo "Passwords do not match"
}
?>

-- 
Asbjørn Eliassen
Fiolstien 1B-6   
8515 Narvik      


On Tue, 10 Dec 2002, Jim Greene wrote:

> I would like to do it in either Perl or PHP
> Jim
> 
> ----- Original Message -----
> From: "Asbjørn Eliassen" <ahel@hinux.hin.no>
> To: "Jim Greene" <jwgreene@megalink.net>
> Cc: "OpenLDAP Software List" <openldap-software@OpenLDAP.org>
> Sent: Tuesday, December 10, 2002 1:40 PM
> Subject: Re: Question about LDAP and password Changes
> 
> 
> > In what language?
> > Generally: Do a bind on with the old password, if the bind
> > succeeds, then you can change that users password, (remember to compare
> > the two given passwords before updating)
> > Otherwise send an appropriate error message.
> >