[Fedora-directory-users] Re: Virtual Views problem

Fabrice Durand oeufdure at gmail.com
Wed Oct 17 09:36:51 UTC 2007


Hi
thank you for the reply.
You are right , it's because my "ou" ou=entreprise,ou=annuaire,dc =test,dc=fr
and ou=annuaire,dc =test,dc=fr contain objectclass=nsview , but not contain
nsviewfilter=something..

Thank
Fabrice

> Hi,
> i try to understand what's wrong with my virtual views.
>
You are searching for views inside the view hierarchy since
ou=entreprise,ou=annuaire,dc=test,dc=fr is a view without a filter.  So
you're search is being rewritten to be from scope
ou=annuaire,dc=test,dc=fr, made a subtree search if it is not already,
and then the filter is rewritten to realize the view.  Part of the
filter rewriting is to ignore views entries unless they match the
original filter and are in the original search scope - it is quite
possible that there is some odd interaction in this case. Do you see the
views if you use (ou=*)?

> 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 <http://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
> ------------------------------------------------------------------------
>
> --
> Fedora-directory-users mailing list
> Fedora-directory-users at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-directory-users
>


--
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-directory-users/attachments/20071017/82b92294/attachment.htm>


More information about the Fedora-directory-users mailing list