From: Graham B. <gb...@po...> - 2000-06-20 22:10:13
|
OK, I changed this bit to After a successful bind you are ready to retrieve the schema information. You do this by initializing a schema object. $schema = $ldap->schema(); In this case Net::LDAP will attempt to determine the dn under which the schema can be found. First it will look for the attribute C<subschemasubentry> in the root DSE. If that cannot be found then it will default to the assumption of C<cn=schema> Alternatively you can specify the dn where the schema is to be found with $schema = $ldap->schema(dn => $dn); Once we have a dn to search for, Net::LDAP will fetch the schema entry with $mesg = $self->search( base => $dn, scope => 'base', filter => '(objectClass=*)', ); Once the schema object has been initialized, schema methods are used to retrieve the data. There are a number of ways this can be done. Information on the schema methods can be found in the Net::LDAP::Schema pod documentation. Graham. On Tue, Jun 20, 2000 at 02:44:04PM +0100, Chris Ridd wrote: > On Mon, 19 Jun 2000 13:52:31 CDT, Clif Harden wrote: > > + After a successful bind you are ready to retrieve the schema > > + information. You do this by initializing a schema object. > > + > > + $schema = $ldap->schema(); > > + > > + In this case the default schema commonName (cn) is being > > + used to retrieve the schema. > > That description is wrong. schema() will retrieve the schema held by > the server using information present in the server's root DSE. See RFC > 2251 section 3.4 > > > + or > > + > > + $schema = $ldap->schema($cn); > > + > > + In this case an alternative schema commonName (cn) is being > > + used to retrieve the schema. > > That's wrong for similar reasons. The argument is actually the DN of a > subentry or entry that contains the schema. > > X.500 servers will for instance, have subschema stored in subentries > below the points which they are mastering, eg <cn=subschema-subentry,o=Y > oyodyne,c=US>, *not* directly below the root. > > > + The default LDAP schema name is cn=schema. However this > > + may not always be the case, Microsoft Exchange systems are known > > + to build a schema commonName (cn) that is based on domain and > > + server name. > > There is no default schema name in the standards. However, Net::LDAP > will guess at a DN of <cn=schema> if it cannot find the > subschemaSubentry attribute in the root DSE. > > Looks good otherwise! > > Chris > > |