Hi,
i try to understand what's wrong with my virtual views.
I've got an 'ou' where all my users are (ou=People,dc=test,dc=fr)
So i create a virtual views with différent ou with objectclass : nsview and
with nsViewFilter: (something) like this:
dn: ou=entreprise,ou=annuaire,dc=test,dc=fr
modifytimestamp: 20071005102053Z
modifiersname: cn=directory manager
ou: Cap l'Orient
objectClass: organizationalUnit
objectClass: top
objectClass: nsview
creatorsname: cn=directory manager
createtimestamp: 20060130145928Z
nsuniqueid: fad66382-1dd111b2-8076e5f7-b3860000
parentid: 323
entryid: 324
entrydn: ou=entreprise,ou=annuaire,dc=test,dc=fr
numsubordinates: 8
subschemasubentry: cn=schema
hassubordinates: TRUE
dn: ou=Services Fonctionnels,ou=entreprise,ou=annuaire,dc=test,dc=fr
modifytimestamp: 20071008122956Z
modifiersname: cn=directory manager
nsViewFilter: (departmentnumber=DGSF*)
objectClass: organizationalUnit
objectClass: top
objectClass: nsview
ou: DG Services Fonctionnels
creatorsname: cn=directory manager
createtimestamp: 20060130145928Z
nsuniqueid: fad66383-1dd111b2-8076e5f7-b3860000
parentid: 324
entryid: 325
entrydn: ou=services fonctionnels,ou=entreprise,ou=annuaire,dc=test,dc=fr
numsubordinates: 3
subschemasubentry: cn=schema
hassubordinates: TRUE
dn: ou=Ressources Humaines,ou=Services
Fonctionnels,ou=entreprise,ou=annuaire,dc=test,dc=fr
modifytimestamp: 20071005102032Z
modifiersname: cn=directory manager
nsViewFilter: (departmentnumber=DGSF-RH)
objectClass: organizationalUnit
objectClass: top
objectClass: nsview
ou: Ressources humaines
creatorsname: cn=directory manager
createtimestamp: 20060130145928Z
nsuniqueid: fad66384-1dd111b2-8076e5f7-b3860000
parentid: 325
entryid: 326
entrydn: ou=ressources humaines,ou=services
fonctionnels,ou=entreprise,ou=annuaire,dc=test,dc=fr
numsubordinates: 0
subschemasubentry: cn=schema
hassubordinates: FALSE
....
The problem is when it try to get all the hierarchy with a perl script or
with php under ou=entreprise,ou=annuaire,dc=test,dc=fr , FDS doesn't return
all the ou. (with phpldapadmin i can see the hierarchy)
The perl script i use to get all the hierarchy:
use Net::LDAP;
use Switch;
$ldup = Net::LDAP->new( '127.0.0.1' ) or die "$@";
$masg = $ldup->bind ; # an anonymous bind
$masg = $ldup->search( # perform a search
base =>
"ou=entreprise,ou=annuaire,dc=caplorient,dc=com",
scope => 'sub',
filter => "(objectClass=nsview)"
);
$masg->code && die $masg->error;
foreach $entry ($masg->entries)
{
$uid=$cn=$givenname=$mail=$sn="NULL";
$dn=$entry->dn();
foreach $attr ($entry->attributes)
{
if($attr eq ou)
{
$uid=$entry->get_value($attr);
print $dn."\n";
print $uid."\n";
}
}
}
$mesg = $ldup->unbind; # take down session
If anyone has got the same type of problem , thank you in advance for the
answer
Fabrice