Hi,
I wish to print out the attributes of creatorsName,
createTimestamp, modifiersName and modifyTimestamp.
I'm using openldap V3 and can bind ok and obtain results from ldap using
perl 5.6.1. (perl-ldap-29, Authen-SASL-2.04, Net_SSLeay.pm-1.23, IO-Socket-SSL-0.94),
operatinig on RH linux ES2.1 with rpms of openldap-2.0.27-4.7 and
cyrus-sasl-1.5.24-24
However, I cannot see the attributes required.
The slapd.conf part is:
access to dn=".*,dc=colony,dc=xxx"
by ssf=128 dn="cn=gldap,ou=system,dc=xxx" write
access to dn.base=""
by ssf=128 * read
and
A snippet of the code:
----------------------------------------------
# Perform a bind
my $ldap = bind_to_ldap(); # exception will be thrown if unsuccessful
#my $filter = "(&(objectClass=extensibleObject) (cn=*))";
#my $filter = "(objectClass=extensibleObject)";
my $filter = "(objectClass=*)";
my $dn = "ou=Hosts,ou=System,$base_dn";
#my $attr = "[ 'dn', 'cn', 'memberUid', 'modifyTimestamp' ]";
my $attr = "[ 'creatorsName', 'modifyTimestamp', 'modifiersName',
'createTimeStamp' ]";
my $mesg = $ldap->search(
base => "$base_dn",
filter => $filter,
scope => "sub",
attrs => $attr
);
my $max = $mesg->count;
print $max, "\n";
for (my $i = 0; $i < $max; $i++)
{
my $entry = $mesg->entry($i);
print $entry->get_value('cn'), "\n";
#print $entry->get_value('memberUid'), "\n";
print "Creator's Name : ", $entry->get_value('creatorsName'), "\n";
print "Modifier's Name : ", $entry->get_value('modifiersName'),
"\n";
print "modification ts : ", $entry->get_value('modifyTimestamp'),
"\n";
print "creation ts : ", $entry->get_value('createTimeStamp'), "\n";
}
$ldap->unbind;
---------------------------------------------
A snippet of the output:
--------------------------------------------
tim
Creator's Name :
Modifier's Name :
modification ts :
creation ts :
--------------------------------
All attributes exist in core.schema - an example is:
attributetype ( 2.5.18.1 NAME 'createTimestamp'
EQUALITY generalizedTimeMatch
ORDERING generalizedTimeOrderingMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
----------------------------------------------
Qu: Do I need to increase access in slapd.conf at dn.base to return my
output.
- I will get an LDAP browser to help me here hopefully.
Regards
Gerry
Linux Infrastructure - Senior Developer
Tel: +64 9 359 8896
Ext Email [EMAIL PROTECTED]