Displaying 1 result from an estimated 1 matches for "gerarsenhapadraotextoplano".
2013 Oct 02
0
Using userpassword attribute with sha1 in samba4
...people from a ldap(Openldap) base to
Samba4 so I need to use the same password.
I'm using userpassword in samba to store the passwords sha1 but I don't
understand what is happening. My user is not logging on the system.
Do I need to enable anything in samba4 ?
My script:
public function gerarSenhaPadraoTextoPlano($strSenha)
{
$senha = "\"" . $strSenha . "\"";
$novaSenha = null;
$len = strlen($senha);
for($i=0;$i<$len;$i++)
$novaSenha .= "{$senha{$i}}\000";
return $novaSenha;
}
$ldaprecord['userpassword'] = $this->gerarSenhaPadraoTe...