[phpldapadmin] [ phpldapadmin-Bugs-3003779 ] Unable to check password for NT and LN samba hashed

"SourceForge.net" <[email protected]> Wed, 19 May 2010 02:05:53 +0000
Newsgroups gmane.comp.ldap.davedap
Message-ID <[email protected]>
Bugs item #3003779, was opened at 2010-05-18 21:35
Message generated for change (Settings changed) made by olafrv
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=3003779&group_id=61828

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
>Group: 1.2.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Olaf Reitmaier Veracierta (olafrv)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unable to check password for NT and LN samba hashed

Initial Comment:
When using "check password" link on a hash or password field samba NT or LM hash, the check function always return false.

The problems is that the password_check function in lib/function.php does not support LM or NT password, the SOLUTION CODE is bellow and consist to check using lmhash and nthash function before fail to check password in default action of the function:

                # No crypt is given assume plaintext passwords are used
                default:
                        //[email protected] - 2010/05/18
                        # Ok, But check first against lm and nt samba hashes
                        $sambapassword = new smbHash;
                        $lmhash = strtolower($sambapassword->lmhash($plainpassword));
                        $nthash = strtolower($sambapassword->nthash($plainpassword));
                        if ($lmhash==strtolower($cryptedpassword) ||
                                $nthash==strtolower($cryptedpassword)) return true;
                        //[email protected] - 2010/05/18

                        if ($plainpassword == $cryptedpassword)
                                return true;
                        else
                                return false;


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498546&aid=3003779&group_id=61828

------------------------------------------------------------------------------

______________________________________
phpLDAPadmin development mailing list.
To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
http://phpldapadmin.sourceforge.net/