Re: NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Chris Ridd
On 9/11/06 11:03, Quanah Gibson-Mount <[EMAIL PROTECTED]> wrote: > Why are you base64 encoding the value yourself? There is no need for you > to do that. It'll happen automatically when added to the LDAP server. > > Basically, you are base64 encoding the word "foo", then then sticking {MD5} > i

Re: performance patch in LDIF.pm

2006-11-09 Thread Graham Barr
On Nov 6, 2006, at 12:24 PM, Chris Ridd wrote: old _wrap() - sub _wrap { if($_[1] > 40) { my $pos = $_[1]; while($pos < length($_[0])) { substr($_[0],$pos,0) = "\n "; $pos += $_[1]+1; } } $_[0]; } new _wrap()

Re: NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Graham Barr
On Nov 9, 2006, at 5:59 PM, Hans Poo wrote: Hi, thank your response: I prepare the password: my $digest = md5_base64("foo"); my $result = $ldap->modify(dn=>$dn, replace=>{'userPassword'=>"{MD5}$digest"}); The expected result is to have {MD5}rL0Y20zC+Fzt72VPzMSk2A as the value for the userP

Re: NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Hans Poo
Thank's to all, there was a trouble in my program and it never tried the Net::LDAP::Extension::SetPassword as i supposed it was doing. With this module it worked fine, but always using SMD5, i just give it the password without encoding or encoding type heading. I will check if there is a cha

Re: NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Mike Whitaker
On 9 Nov 2006, at 23:28, Hans Poo wrote: Thanks again Quanah, but snip, it doesn't work, i've put: replace=>{'userPassword'=>"{MD5}foo"} But in the database i get: userPassword:: e01ENX1mb28= ...that again is: perl -MMIME::Base64 -e 'print decode_base64 ("e01ENX1mb28="), "\n"; ' {MD5}foo

Re: NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Quanah Gibson-Mount
--On Thursday, November 09, 2006 7:28 PM -0400 Hans Poo <[EMAIL PROTECTED]> wrote: Thanks again Quanah, but snip, it doesn't work, i've put: replace=>{'userPassword'=>"{MD5}foo"} But in the database i get: userPassword:: e01ENX1mb28= ...that again is: perl -MMIME::Base64 -e 'print decod

Re: NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Hans Poo
Thanks again Quanah, but snip, it doesn't work, i've put: replace=>{'userPassword'=>"{MD5}foo"} But in the database i get: userPassword:: e01ENX1mb28= ...that again is: perl -MMIME::Base64 -e 'print decode_base64 ("e01ENX1mb28="), "\n"; ' {MD5}foo No matter what i give, it always get base64

Re: NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Quanah Gibson-Mount
--On Thursday, November 09, 2006 7:59 PM -0400 Hans Poo <[EMAIL PROTECTED]> wrote: Hi, thank your response: I prepare the password: my $digest = md5_base64("foo"); my $result = $ldap->modify(dn=>$dn, replace=>{'userPassword'=>"{MD5}$digest"}); The expected result is to have {MD5}rL0Y20zC

Re: NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Hans Poo
Hi, thank your response: I prepare the password: my $digest = md5_base64("foo"); my $result = $ldap->modify(dn=>$dn, replace=>{'userPassword'=>"{MD5}$digest"}); The expected result is to have {MD5}rL0Y20zC+Fzt72VPzMSk2A as the value for the userPassword field, but instead i get: userPasswor

Re: NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Quanah Gibson-Mount
--On Thursday, November 09, 2006 6:46 PM -0400 Hans Poo <[EMAIL PROTECTED]> wrote: I'am using the Perl Net::LDAP Module with openldap-2.3.24 (uses LDAP protocol Version 3). I need to update the userPassword field, the problem is that somewhere in the middle the new password i'am giving gets

NET::LDAP, somewhere the new userPassword gets base64 encoded

2006-11-09 Thread Hans Poo
I'am using the Perl Net::LDAP Module with openldap-2.3.24 (uses LDAP protocol Version 3). I need to update the userPassword field, the problem is that somewhere in the middle the new password i'am giving gets base64 encoded. As to my understanding i'am preparing the whole password. In the pas