From: Clif H. <c-h...@ti...> - 2000-11-29 14:12:06
|
Javier, Attached is a simple perl script that will get and display the schema contents of a directory server. You will need perl-ldap 0.22 and to change a couple of lines in the code to make it work for you. You may need to change the first line of the script to point to your location of perl. Change the word "cnb0116358" to the name of your directory server. It is near the top of the file. You may need to bind to your directory as the directory admin in order to get the schema, change the ldap->ldapbind line to include you directory admin "cn" and password if needed. You will probably want to pipe the output to a file. I have not tried this script out on a openldap 2.x system yet, but it does work on our x.500 and Netscape directory servers. Clif Harden INTERNET: c-h...@ti... Javier wrote: > > Hello guys! > > Can somebody help me about this: > > I'm triying to get the object's schema from LDAP server, but I can't. > > I'm working with OpenLdap 2.0.7, I think that this version of LDAP > server support LDAPv3. > Is it correct? > > I do this to get the schema: > > $dn="cn=Jane, ou=myDept, o=myorg, c=ES"; > $ldap= Net::LDAP->new('192.168.0.44', > debug=>0, > async=>1,); > $ldap->bind; > > $schema = $ldap->schema (dn => $dn); > > @attr_person = $schema->attributes( "person" ); > > $ldap->unbind; > > # End of example script > > I debug this script and the variable $schema return from $ldap->schema > is not full! > and Schema.pm's methods , for example $schema->attributes( "person" ) > don't return anything. > > Can somebody tell me step by step how I can get the schema from the server? > I do need configure Openldap for do this? > > Thanks for all!! Sorry for my English > Javier -- |