<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Etienne Lachance &#187; OpenLDAP</title>
	<atom:link href="http://etiennelachance.com/tag/openldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://etiennelachance.com</link>
	<description></description>
	<lastBuildDate>Sat, 17 Sep 2011 18:39:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>OpenLDAP et Active Directory : Syncroniser la Suppression d&#8217;éléments</title>
		<link>http://etiennelachance.com/2010/05/openldap-et-active-directory-syncroniser-la-suppression-delements/</link>
		<comments>http://etiennelachance.com/2010/05/openldap-et-active-directory-syncroniser-la-suppression-delements/#comments</comments>
		<pubDate>Mon, 03 May 2010 19:46:32 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[activedirectory]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenLDAP]]></category>
		<category><![CDATA[synchronisation]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=131</guid>
		<description><![CDATA[Est-ce possible, un système pour faire la synchronisation entre OpenLDAP et Active Directory ? Je suis présentement en train de créer une série d&#8217;applications pour faire tout simplement(relatif) synchronisé un OpenLDAP (master) vers un Active Directory (Slave). Voici un premier &#8230; <a href="http://etiennelachance.com/2010/05/openldap-et-active-directory-syncroniser-la-suppression-delements/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Est-ce possible, un système pour faire la synchronisation entre OpenLDAP et Active Directory ?</h2>

<p>Je suis présentement en train de créer une série d&#8217;applications pour faire tout simplement(relatif) synchronisé un OpenLDAP (master) vers un Active Directory (Slave).</p>

<p>Voici un premier <em>draft</em> pour la suppression d&#8217;élément.  Ce script écrit en C# (sous Mono), a comme bût d&#8217;avoir un point d&#8217;accès pour la suppression d&#8217;attribut ou d&#8217;entré d&#8217;un OpenLDAP et d&#8217;un Active Directory.</p>

<p>Je vais créer un projet Open Source avec le code que j&#8217;ai déjà fait sous peu, avec une licence GNU (ou similaire).  Mais en attendant voici le code pour la suppression d&#8217;élément.</p>

<p><a href="http://etiennelachance.com/files/ldap-delete.zip">ldap-delete.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2010/05/openldap-et-active-directory-syncroniser-la-suppression-delements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installation d&#8217;OpenLDAP sous Ubuntu 9.10 ou 10.4</title>
		<link>http://etiennelachance.com/2010/03/installation-dopenldap-sous-ubuntu-9-10-ou-10-4/</link>
		<comments>http://etiennelachance.com/2010/03/installation-dopenldap-sous-ubuntu-9-10-ou-10-4/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 18:23:36 +0000</pubDate>
		<dc:creator>estheban</dc:creator>
				<category><![CDATA[Tutoriel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenLDAP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://etiennelachance.com/?p=123</guid>
		<description><![CDATA[Note Suite a de nombreuses frustration de votre part et de la mienne au sujet de OpenLDAP. OpenLDAP &#8220;is a pain in the a..&#8221;. Pour mon infrastructure j&#8217;ai migré vers OpenDS; necessite un peu plus de ressource (Java) par contre, &#8230; <a href="http://etiennelachance.com/2010/03/installation-dopenldap-sous-ubuntu-9-10-ou-10-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Note</h2>

<p>Suite a de nombreuses frustration de votre part et de la mienne au sujet de OpenLDAP. OpenLDAP &#8220;is a pain in the a..&#8221;. Pour mon infrastructure j&#8217;ai migré vers OpenDS; necessite un peu plus de ressource (Java) par contre, la gestion et la syncronisation est un charme. Je vais publier bientôt des tutoriel au sujet de <a href="http://www.opends.org/" target="_blank">OpenDS</a>.</p>

<h2>Description</h2>

<p>La configuration d&#8217;OpenLDAP c&#8217;est un peu compliquer. cn=config est toujours utilisé, par contre lors de l&#8217;installation du paquet, uniquement un squelette de la configuration est installé.</p>

<p>On ne vous demande plus de mot de passe lors de l&#8217;installation du paquet et &#8220;dpkg-reconfigure slapd&#8221; ne fait que restaurer le squelette de la configuration initial.  Vous devez utiliser le compte <strong>root</strong> (ou sudo) pour configurer la base de donnée, dn et acl.</p>

<p>Voici une procédure sur comment installer OpenLDAP sous Ubuntu 9.10 ou 10.4.</p>

<p>Le guide officiel sur <a rel="nofollow" href="http://help.ubuntu.com/">help.ubuntu.com</a> n&#8217;est pas à jour et ne spécifie pas comment installer OpenLDAP sous Karmic ou Lucid.</p>

<p>Dans ce tutoriel nous utiliserons <em>dc=example,dc=com</em> comme arbre LDAP.  Ajuster en conséquence.</p>

<p><span id="more-123"></span></p>

<h2>Pré-requis</h2>

<p>Avoir installé Ubuntu</p>

<p>Paquets à installer :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> slapd ldap-utils</pre></div></div>



</div>

<p></div></p>

<h2>Configuration</h2>

<h3>Étape 1: Changer de répertoire pour /etc/ldap :</h3>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ldap</pre></div></div>



</div>

<p></div></p>

<h3>Étape 2: Ajouter les schéma que vous avez de besoin, car uniquement le schema core est ajouté par défaut :</h3>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ldap<span style="color: #000000; font-weight: bold;">/</span>schema<span style="color: #000000; font-weight: bold;">/</span>cosine.ldif
ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ldap<span style="color: #000000; font-weight: bold;">/</span>schema<span style="color: #000000; font-weight: bold;">/</span>inetorgperson.ldif
ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ldap<span style="color: #000000; font-weight: bold;">/</span>schema<span style="color: #000000; font-weight: bold;">/</span>nis.ldif</pre></div></div>



</div>

<p></div>
<strong>Note</strong>: Il faut entrer <strong>CHAQUE LIGNE</strong>, ce ne sont pas des commentaires.</p>

<h3>Étape 3:  Ajouter le module de base de donnée et la créer.</h3>

<p>Créer un fichier : <em>db.ldif</em></p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> db.ldif</pre></div></div>



</div>

<p></div>
et ajouter le text suivant :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="ldif" style="font-family:monospace;"># Load dynamic backend modules
dn: cn=module{0},cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: {0}back_hdb
&nbsp;
# Create the database
dn: olcDatabase={1}hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcDbDirectory: /var/lib/ldap
olcSuffix: dc=example,dc=com
olcRootDN: cn=admin,dc=example,dc=com
olcRootPW: example
olcDbConfig: {0}set_cachesize 0 2097152 0
olcDbConfig: {1}set_lk_max_objects 1500
olcDbConfig: {2}set_lk_max_locks 1500
olcDbConfig: {3}set_lk_max_lockers 1500
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcDbIndex: uid pres,eq
olcDbIndex: cn,sn,mail pres,eq,approx,sub
olcDbIndex: objectClass eq</pre></div></div>



</div>

<p></div></p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> db.ldif</pre></div></div>



</div>

<p></div>
Prendre note que <em>olcRootPW: example</em> spécifie le mot de passe. Remplacer <em>example</em> par le mot de passe désiré.</p>

<h3>Étape 4: Créer le dn de base et ajouter le compte administrateur pour le serveur OpenLDAP.</h3>

<p>Modifer le text suivant a vos besoins the text below to your needs and wants and generate a password for the admin account. La chaine MD5 présente dans l&#8217;exemple représente : <em>example</em></p>

<p>Créer un mot de passe encrypter pour le compte administrateur, avec la commande suivante :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">slappasswd <span style="color: #660033;">-h</span></pre></div></div>



</div>

<p></div>
Entrer le mot de passe désiré 2 fois et copier le résultat dans le text plus bas.</p>

<p>Créer le fichier <em>base.ldif</em>:</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> base.ldif</pre></div></div>



</div>

<p></div>
Contenu du fichier base.ldif:</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="ldif" style="font-family:monospace;">dn: dc=example,dc=com
objectClass: dcObject
objectclass: organization
o: example.com
dc: example
description: My LDAP Root
&nbsp;
dn: cn=admin,dc=example,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
userPassword:{MD5}Gnmk1g3mcY6OWzJuM4rlMw==
description: LDAP administrator</pre></div></div>



</div>

<p></div>
Ajouter à la base de donnée avec la commande suivante :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> base.ldif</pre></div></div>



</div>

<p></div></p>

<h3>Étape 5: Modifier le système d&#8217;acl (liste de contrôle d&#8217;accès)</h3>

<p>Il y a quelques acl dans la configuration d&#8217;OpenLDAP qui prévient la connexion à partir d&#8217;un client ldap comme <a rel="nofollow" href="http://phpldapadmin.sourceforge.net/wiki/index.php/Main_Page">phpldapadmin</a> ou <a rel="nofollow" href="http://directory.apache.org/studio/">Apache Directory Sudio</a>, alors nous allons ajuster les droits pour <em>cn=admin,cn=config</em>. Après cette modification l&#8217;option -D cn=admin,cn=config sera nécessaire pour ce connecter au serveur LDAP.</p>

<p>Créer un fichier <em>config.ldif</em></p>

<p>vi config.ldif</p>

<p>Contenu du fichier <em>config.ldif</em>:</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="ldif" style="font-family:monospace;">dn: cn=config
changetype: modify
delete: olcAuthzRegexp
&nbsp;
dn: olcDatabase={-1}frontend,cn=config
changetype: modify
delete: olcAccess
&nbsp;
dn: olcDatabase={0}config,cn=config
changetype: modify
delete: olcRootDN
&nbsp;
dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcRootDN
olcRootDN: cn=admin,cn=config
&nbsp;
dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {MD5}Gnmk1g3mcY6OWzJuM4rlMw==
&nbsp;
dn: olcDatabase={0}config,cn=config
changetype: modify
delete: olcAccess</pre></div></div>



</div>

<p></div>
Prendre note de ne pas oublier de changer la valeur de <em>olcRootPW</em> par le mot de passe en MD5 créé plutôt.</p>

<p>Intégrer dans OpenLDAP :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapadd <span style="color: #660033;">-Y</span> EXTERNAL <span style="color: #660033;">-H</span> ldapi:<span style="color: #000000; font-weight: bold;">///</span> <span style="color: #660033;">-f</span> config.ldif</pre></div></div>



</div>

<p></div></p>

<h3>Étape 6: Ajuster les acl du LDAP</h3>

<p>Maintenant nous devons ajouter quelques droits au LDAP, root possède les droits de lecture et d&#8217;écriture, parcontre l&#8217;acl suivant représente celui qui à toujours été livré avec OpenLDAP dans le passé.</p>

<p>Créer un fichier nommé acl.ldif :</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> acl.ldif</pre></div></div>



</div>

<p></div>
Contenu du fichier acl.ldif:</p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="ldif" style="font-family:monospace;">dn: olcDatabase={1}hdb,cn=config
add: olcAccess
olcAccess: to attrs=userPassword,shadowLastChange by dn=&quot;cn=admin,dc=example,dc=com&quot; write by anonymous auth by self write by * none
olcAccess: to dn.base=&quot;&quot; by * read
olcAccess: to * by dn=&quot;cn=admin,dc=example,dc=com&quot; write by * readNow load the acl into the openldap server:</pre></div></div>



</div>

<p></div></p>

<div>
<div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldapmodify <span style="color: #660033;">-x</span> <span style="color: #660033;">-D</span> <span style="color: #007800;">cn</span>=admin,<span style="color: #007800;">cn</span>=config <span style="color: #660033;">-W</span> <span style="color: #660033;">-f</span> acl.ldif</pre></div></div>



</div>

<p></div>
Voilà!  Un OpenLDAP fonctionnel.</p>

<h2>Références</h2>

<ul>
    <li><a rel="nofollow" href="http://www.howtoforge.com/install-and-configure-openldap-on-ubuntu-karmic-koala">http://www.howtoforge.com/install-and-configure-openldap-on-ubuntu-karmic-koala</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://etiennelachance.com/2010/03/installation-dopenldap-sous-ubuntu-9-10-ou-10-4/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>

