[LUGOS] ldap

Matej Podgorsek matej.podgorsek at fe.uni-lj.si
Wed Jun 15 13:11:18 CEST 2005


Pozdravljeni!

Zanima me, ce kdo mogoce ve, zakaj mi php ne izpise userPassword pri zaganjanju naslednje skripte. Sicer mi izpise ostale vrednosti. Ce pogledam uporabnika  npr. z Ldap Administrator 3.1 mi izpise userPassword. Kot vse kaze geslo ni inkriptirano.

<html>
<body>
<?

$ds=ldap_connect("localhost");
if ($ds) {      
        $r=ldap_bind($ds,"cn=admin,dc=uni-lj,dc=si", "pw");
        echo $r . "<br>";
        }
$dn = "dc=fer,dc=uni-lj,dc=si";
$filter = "(|(cn=*)(userPassword=*)(sn=*))";
$samoovo = array ( "cn", "userPassword" , "sn");
$rpr = ldap_search($ds,$dn,$filter,$samoovo);
$info = ldap_get_entries ($ds,$rpr);
//echo $info["count"] . "<br>";
echo $info[1]["cn"][0] . "<br>";
echo $info[1]["userPassword"][0] . "<br>";
echo $info[1]["sn"][0] . "<br>";

echo $info[2]["cn"][0];

?>
</body>
</html>

Dodan je bil z ldapadd Sheme so pravilno dodane. V file je bilo napisano:
_______________________________________________________________________
dn: cn=uporabnik01 at fe.uni-lj.si,dc=fer,dc=uni-lj,dc=si
objectClass: siEduPerson
objectClass: person
objectClass: inetOrgPerson
siEduPersonEMSO: 123
siEduPersonPrimaryAffiliation: Staff
siEduPersonAffiliation: Staff
cn: uporabnik01 at fe.uni-lj.si
givenName: uporabnik01
sn: uporabnik
siEduPersonPrincipalName: uporabnik at fe.uni-lj.si
userPassword: secret

M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://liste2.lugos.si/pipermail/lugos-list/attachments/20050615/9dd51179/attachment.html


More information about the lugos-list mailing list