Line 1:
Line 1:
+
<!-- BEGIN origin interlang links -->
+
<!-- You can edit this section but do NOT remove these comments
+
Links below will be automatically replicated on translated pages by PolyglotBot -->
+
[[fr:Installer_et_configurer_OpenLDAP]]
+
[[es:Instalar_y_configurar_OpenLDAP]]
+
<!-- END interlang links -->
+
[[Category:Admin]]
[[Category:Admin]]
+
[[Category:Admin_en]]
+
This chapter is not related to Dolibarr iself. It contains a tutorial to install a LDAP annuary that could be linked with Dolibarr.
This chapter is not related to Dolibarr iself. It contains a tutorial to install a LDAP annuary that could be linked with Dolibarr.
Line 19:
Line 28:
Modify file '''slapd.conf''' also to add includes of schemas you will need to declare your LDAP objects.
Modify file '''slapd.conf''' also to add includes of schemas you will need to declare your LDAP objects.
−
<source lang="ini">
+
<syntaxHighlight lang="ini">
include ./schema/core.schema
include ./schema/core.schema
include ./schema/cosine.schema
include ./schema/cosine.schema
include ./schema/inetorgperson.schema
include ./schema/inetorgperson.schema
include ./schema/nis.schema
include ./schema/nis.schema
−
</source>
+
</syntaxHighlight>
or add shemas with
or add shemas with
−
<source lang="ini">
+
<syntaxHighlight lang="ini">
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
−
</source>
+
</syntaxHighlight>
Restart the service.
Restart the service.
Line 49:
Line 58:
Execute file using the LDAP admin user:
Execute file using the LDAP admin user:
−
<source lang="bash">
+
<syntaxHighlight lang="bash">
ldapadd -f init.ldif -D "cn=admin,dc=mydomain,dc=com" -w secret
ldapadd -f init.ldif -D "cn=admin,dc=mydomain,dc=com" -w secret
−
</source>
+
</syntaxHighlight>
= Create few users =
= Create few users =
Create a file inituser.ldif with your organization. For example (take care to keep empty line between each block):
Create a file inituser.ldif with your organization. For example (take care to keep empty line between each block):
−
<source lang="ini">
+
<syntaxHighlight lang="ini">
# Some User
# Some User
dn: sn=someuser,ou=mypeople,dc=nodomain
dn: sn=someuser,ou=mypeople,dc=nodomain
+
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: organizationalPerson
objectClass: person
objectClass: person
objectClass: top
objectClass: top
cn: Some User
cn: Some User
−
sn: Some
+
sn: someuser
+
mail: someuser@nodomain
userPassword: {SSHA}hnP4gNK7SbgsAW3eTZYf23a4R7Ob19l2
userPassword: {SSHA}hnP4gNK7SbgsAW3eTZYf23a4R7Ob19l2
−
</source>
+
</syntaxHighlight>
Use '''slappasswd -s passwordtocrypt''' to generate a password.
Use '''slappasswd -s passwordtocrypt''' to generate a password.
Line 74:
Line 85:
To confirm problem, go onto DOS under directory data of OpenLDAP and launch command
To confirm problem, go onto DOS under directory data of OpenLDAP and launch command
−
<source lang="bash">
+
<syntaxHighlight lang="bash">
..\db_stat -e
..\db_stat -e
−
</source>
+
</syntaxHighlight>
If message is the one described, launch repare of base with
If message is the one described, launch repare of base with
−
<source lang="bash">
+
<syntaxHighlight lang="bash">
..\db_recover
..\db_recover
−
</source>
+
</syntaxHighlight>
Server should be able to start again.
Server should be able to start again.