Skip to main content

Setting up ldap on Ubuntu 9.10

Installing slapd on Ubuntu 9.10 is not enough. The configuration of slapd requires more steps. I refer to article: http://doc.ubuntu.com/ubuntu/serverguide/C/openldap-server.html which apparently also applies to 9.10. Make sure you load the necessary schemas:
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif 
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif 
My ldif file I wanted to load contains dc=ldap,dc=example,dc=ipp. So I wanted to set up a rootdn starting with same domain.
# Load dynamic backend modules
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb

# Database settings
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=ldap,dc=example,dc=ipp
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=ldap,dc=example,dc=ipp
olcRootPW: secret
olcDbConfig: set_cachesize 0 2097152 0
olcDbConfig: set_lk_max_objects 1500
olcDbConfig: set_lk_max_locks 1500
olcDbConfig: set_lk_max_lockers 1500
olcDbIndex: objectClass eq
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcAccess: to attrs=userPassword by dn="cn=admin,dc=ldap,dc=example,dc=ipp" write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
olcAccess: to dn.base="" by * read
olcAccess: to * by dn="cn=admin,dc=ldap,dc=example,dc=ipp" write by * read
Note that I changed the domain, and left password to secret. Load this backend file with:
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f backend.ldap.example.ipp.ldif
You will now need to restart your slapd daemon. Then you can add your own ldif file with data. Afterwards you can test with ldapsearch. As normal user:
ldapsearch -x -b "dc=ldap,dc=example,dc=ipp" uid=User sn ginveName cn
ldapsearch -x -b "dc=ldap,dc=example,dc=ipp" '(objectclass=top)'
ldapsearch -x -b "dc=ldap,dc=example,dc=ipp" '(objectclass=domain)'
ldapsearch -x -b "dc=ldap,dc=example,dc=ipp" '(objectclass=person)'
ldapsearch -x -b "dc=ldap,dc=example,dc=ipp" '(objectclass=organizationalUnit)'

Comments

Popular posts from this blog

SSL handshake failed: Secure connection truncated

Got this problem on Ubuntu 9.10 and 10.10. svn co --username=xx https:/yy zz “SSL handshake failed: Secure connection truncated” According to this link bug-ubuntu The solution is: sudo apt-get install libneon27 cd /usr/lib/ sudo rm libneon-gnutls.so.27 sudo ln -s /usr/lib/libneon.so.27 libneon-gnutls.so.27

Junit4 running parallel junit classes

To run junit testcases parallel, you can create your own class to run junit with: Add this tag to your class declaration. @RunWith(Parallelized.class) Implementation of this class looks like: package mypackage; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.junit.runners.Parameterized; import org.junit.runners.model.RunnerScheduler; public class Parallelized extends Parameterized {         private static class ThreadPoolScheduler implements RunnerScheduler     {         private ExecutorService executor;                 public ThreadPoolScheduler()         {             String threads = System.getProperty("junit.parallel.threads", "16");    ...

Run jmeter from eclipse

Download jmeter source and binaries: http://archive.apache.org/dist/jakarta/jmeter/binaries/jakarta-jmeter-2.3.4.zip http://archive.apache.org/dist/jakarta/jmeter/source/jakarta-jmeter-2.3.4_src.zip Unpack jmeter source file, and rename eclipse.classpath into .classpath. Add a .project file to the same directory: <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>jakarta-jmeter-2.3.4</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> Now import the source code as eclipse project. Add all libs of binary distribution (lib/*.jar) to the new project's lib dir....