ldap password update on OS X Open Directory

10 views
Skip to first unread message

gsprague

unread,
Feb 4, 2009, 6:27:51 PM2/4/09
to openldap
Anyone know how to change OS X Leopard Server Open Directory password
using php ldap_mod_replace.

This is what I am using and it is updating the userPassword attribute
but I cannot authenticate with the new password.

PHP Code:
$encodedPass = "{SHA}" . base64_encode( pack( "H*", sha1( $pass ) ) );
$r=ldap_mod_replace($ldapconn,"uid=".
$username.",cn=users,dc=server,dc=domain,dc=com", $info);

This is leading me to believe that OS X Leopard Server Open Directory
isn't using the userPassword attribute for authentication?
Or maybe I am encoding it wrong?

Thanks in advance!

gsprague

unread,
Feb 4, 2009, 6:35:10 PM2/4/09
to openldap
Hello All,

Anyone know how to change OS X Open Directory password using php
ldap_mod_replace.

This is what I am using and it is updating the userPassword entry but
I cannot authenticate with the new password.

PHP Code:
$encodedPass = "{SHA}" . base64_encode( pack( "H*", sha1( $pass ) ) );
$r=ldap_mod_replace($ldapconn,"uid=".
$username.",cn=users,dc=server,dc=domain,dc=com", $info);

This is leading me to believe that OS X Leopard Server Open Directory
isn't using userPassword for OD authentication?
Or maybe I am just encoding it wrong??

Thanks!
Reply all
Reply to author
Forward
0 new messages