# $Id: README.ldap,v 1.5 2004/01/06 19:53:34 gokohnert Exp $ # # Copyright 2002 by Gero Kohnert # LDAP Module LDAP requires a PHP with LDAP support compiles in. Installation: After unpacking this module you should have a ldap subdirectory in your [tutos install dir]/php directory. Activation For activation you should have a line @include("ldap/mconfig.pinc"); somewhere in your [tutos install dir]/php/modules.pinc file run http://....../php/update.php openladp will need a allow bind_v2 in its config file /etc/openldap/slapd.conf . Usage All known LDAP servers are described in config.pinc Here is a example set of ldap servers described in config.pinc # # DANTE # # primary description $tutos[ldapserver][17] = "alpha.dante.org.uk"; $tutos[ldapport][17] = 389; # Atrribute names should be entered in lowercase only # The server is displayed as DANTE $tutos['ldap:alpha.dante.org.uk:389']['servername']= 'DANTE'; # Stuff is encoded in utf (alternativ is 'plain') $tutos['ldap:alpha.dante.org.uk:389']['coding'] = 'utf'; # the base dn used here $tutos['ldap:alpha.dante.org.uk:389']['basedn'] = 'dc=dante,dc=org,dc=uk'; # the unique key is the dn $tutos['ldap:alpha.dante.org.uk:389']['uniquekey'] = 'dn'; # TUTOS "First Name" is retrieved fro the sn attribute $tutos['ldap:alpha.dante.org.uk:389']['fname'] = 'sn'; # TUTOS "Phonenumber" is retrieved from the telephonenumber attribute $tutos['ldap:alpha.dante.org.uk:389']['phone_1'] = 'telephonenumber'; $tutos['ldap:alpha.dante.org.uk:389']['email_1'] = 'mail'; $tutos['ldap:alpha.dante.org.uk:389']['street1'] = 'street'; $tutos['ldap:alpha.dante.org.uk:389']['zip'] = 'postalcode'; $tutos['ldap:alpha.dante.org.uk:389']['fax_1'] = 'facsimiletelephonenumber'; $tutos['ldap:alpha.dante.org.uk:389']['desc1'] = 'organizationalstatus'; # the picture shown in the addressbook is retrieved from jpegphoto $tutos['ldap:alpha.dante.org.uk:389']['picture'] = 'jpegphoto'; # a url added to the TUTOS entry is found in the labeleduri attribute $tutos['ldap:alpha.dante.org.uk:389']['url'] = 'labeleduri'; # # Another example # $tutos[ldapserver][2] = "x500.bund.de"; $tutos[ldapport][2] = 389; $tutos['ldap:x500.bund.de:389']['servername']= 'BUND'; $tutos['ldap:x500.bund.de:389']['coding'] = 'plain'; $tutos['ldap:x500.bund.de:389']['basedn'] = 'o=Bund,c=DE'; $tutos['ldap:x500.bund.de:389']['uniquekey'] = 'dn'; $tutos['ldap:x500.bund.de:389']['fname'] = 'sn'; $tutos['ldap:x500.bund.de:389']['lname'] = 'givenname'; $tutos['ldap:x500.bund.de:389']['title'] = 'vocation'; $tutos['ldap:x500.bund.de:389']['phone_1'] = 'telephonenumber'; $tutos['ldap:x500.bund.de:389']['fax_1'] = 'facsimiletelephonenumber'; $tutos['ldap:x500.bund.de:389']['zip'] = 'postalcode'; $tutos['ldap:x500.bund.de:389']['email_1'] = 'mail'; $tutos['ldap:x500.bund.de:389']['desc1'] = 'functionaltitle'; $tutos['ldap:x500.bund.de:389']['street1'] = 'postofficebox'; $tutos['ldap:x500.bund.de:389']['city'] = 'gouvernmentorganizationalpersonlocality'; # # and one more complex one # $tutos[ldapserver][0] = "scd2ldap.siemens.net"; $tutos[ldapport][0] = 389; $tutos['ldap:scd2ldap.siemens.net:389']['servername']= 'SCD'; $tutos['ldap:scd2ldap.siemens.net:389']['coding'] = 'utf'; $tutos['ldap:scd2ldap.siemens.net:389']['basedn'] = ' '; $tutos['ldap:scd2ldap.siemens.net:389']['uniquekey'] = 'scdId'; $tutos['ldap:scd2ldap.siemens.net:389']['fname'] = 'givennamenational'; $tutos['ldap:scd2ldap.siemens.net:389']['fname'] = 'givenname'; $tutos['ldap:scd2ldap.siemens.net:389']['lname'] = 'surnamenational'; $tutos['ldap:scd2ldap.siemens.net:389']['lname'] = 'sn'; $tutos['ldap:scd2ldap.siemens.net:389']['title'] = 'personaltitle'; $tutos['ldap:scd2ldap.siemens.net:389']['country'] = 'c'; $tutos['ldap:scd2ldap.siemens.net:389']['phone_1'] = 'telephonenumber'; $tutos['ldap:scd2ldap.siemens.net:389']['phone_2'] = 'mobile'; $tutos['ldap:scd2ldap.siemens.net:389']['fax_1'] = 'faxnumber'; $tutos['ldap:scd2ldap.siemens.net:389']['email_1'] = 'mail'; $tutos['ldap:scd2ldap.siemens.net:389']['department']= 'department'; $tutos['ldap:scd2ldap.siemens.net:389']['city'] = 'localitynational'; $tutos['ldap:scd2ldap.siemens.net:389']['url'] = 'labeleduri'; # the next line will make a subquery for a scdLocality object according to l $tutos['ldap:scd2ldap.siemens.net:389']['+']['A+'] = array('l','scdLocality'); # the next line take the data from the A subquery $tutos['ldap:scd2ldap.siemens.net:389']['street1'] = 'A+street'; $tutos['ldap:scd2ldap.siemens.net:389']['zip'] = 'A+postalcode'; #$tutos['ldap:scd2ldap.siemens.net:389']['+']['B+'] = array('o','organization'); $tutos['ldap:scd2ldap.siemens.net:389']['+']['C+'] = array('ou','organizationalunit'); $tutos['ldap:scd2ldap.siemens.net:389']['company'] = 'C+ounameinternational';