From: Mark W. <mew...@un...> - 2000-08-10 22:44:52
|
If you don't provide any attributes to search, you'll get back all non-operational attributes available to you (of course this depends on the server's ACLs as to which ones you can actually get). If you want operational attributes you must requet them in the search (sorry I overlooked that yesterday). If you want all of the attributes, either list everything in the search, or do 2 searches, one without listing and one with a listing of all of the operational attributes. Mark On Thu, 10 Aug 2000, Bing Du wrote: > Thanks all. Ok, I have given up using as_struct. > > I saw 'createtimestamp' finally by using $ldcon->search(base => > $BASEDN, scope => 'sub', filter => $filter,attrs=> > ["createtimestamp"],typesonly => 0) :). > > A new question: > > I used to use > $ldcon->search(base...,scope...,filter...,attrs=>[],typesonly...) to > retrieve values of all attributes without specificly listing all > attributes' names in @attrs (e.g. @attrs = ('cn', 'phone','email')), and > then use attrs=>@attrs in 'search'. By doing this, I do not need to > change my script whenever new attributes are added in. > > But now I have to explicitly specify operational attributes in > attrs=>[] because I want them. So is there a way to represent all > other regular attributes still without listing them explicitly? > > Thanks, > > Bing > > >>> Chris Ridd <chr...@me...> 08/10/00 02:34AM >>> > Mark Wilcox <mew...@un...> wrote: > > Chris Ridd (who works for Messanging Direct) will be the best one to > > answer this. But he's leaving on a trip, so I don't know if he's > online > > right now. > > Still here... > > > Have you verified that the attribute is actually there (ie. have you > > dumped it out with ldapsearch or MD's version of db2ldif?) > > > > Mark > > The default access controls we have in our directory will only permit > the > DSA manager - which Bing is binding as, so that's OK - read access to > createTimestamp. > > As others have pointed out, createTimestamp is an operational > attribute, so > will only be returned over LDAP when the client explicitly asks for > it. > > So I suspect the problem is either that you aren't explicitly > specifying in > the search operation that you want the createTimestamp back, or the > way > you're accessing the entries back via as_struct is wrong. > > To check the attributes are really coming back over the network, set > debug > => 12 when you create the LDAP object. You will then get a whole load > of > output to stderr which is a dump of the raw protocol. Hopefully you'll > see > the createTimestamps being returned. > > I haven't used as_struct myself, so can't comment on that part. > > Cheers, > > Chris > |