From: Bing D. <Bi...@ci...> - 2000-08-10 22:13:51
|
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 |