From: Behruz R. <beh...@cp...> - 2002-08-29 02:34:17
|
You should know than a DN is never stored whthin a Directory, therefore, there is no way to do a search based on the DN. But as you know the RDN of your DN, you can do a search on this. Let's say if your DN is DN: uid=jsmith,ou-people,dc-acme,dc=com You can used a filter based on the RDN (uid) and also combine it with a object class if you know the type of the object. For instance (&(uid=jsmith)(objectclass=inetOrgPerson)) I hope that can help. Behruz -----Original Message----- From: per...@li... [mailto:per...@li...] On Behalf Of Jim Harle Sent: Monday, August 26, 2002 8:52 AM To: ra...@gm... Cc: per...@li... Subject: Re: Search for a DN Raffaele, To just read a specific DN, do : $ldap->search(base=>$dnIwant, scope=>'base', filter=>'objectClass=*'); --Jim Harle On Mon, 26 Aug 2002 ra...@gm... wrote: > Hi > > A part of a script i made should search for the value of an Attribute in an > Entry and when the > attribute does not exist or is empty it should search for the same one level > below. > > So far no problems... but to get the Entry wich is one level below the > starting entry i need to > search fot a DN: > > original Entry eg: > > cn=item,cn=group,dc=host,dc=com => Here i cant find the value i need so... > > i search one level below: > > cn=group,dc=host,dc=com > > So i need to search for "cn=group,dc=host,dc=com". I recognized that i could > not use a DN in a filer > argument ( "(dn=cn=group,dc=host,dc=com)" ) does not return any results. > > So how can i search for an DN or better: How can i get an Entry on wich i > know the DN? > > cheers, > Raffaele > > -- > GMX - Die Kommunikationsplattform im Internet. > http://www.gmx.net > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 |