30,997
edits
PolyglotBot (talk | contribs) m (Import interlang links (links to translated versions of this page in other languages) from Multi Language Manager table.) |
mNo edit summary Tag: 2017 source edit |
||
| Line 28: | 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. | ||
< | <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 | ||
</ | </syntaxHighlight> | ||
or add shemas with | or add shemas with | ||
< | <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 | ||
</ | </syntaxHighlight> | ||
Restart the service. | Restart the service. | ||
| Line 58: | Line 58: | ||
Execute file using the LDAP admin user: | Execute file using the LDAP admin user: | ||
< | <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 | ||
</ | </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): | ||
< | <syntaxHighlight lang="ini"> | ||
# Some User | # Some User | ||
dn: sn=someuser,ou=mypeople,dc=nodomain | dn: sn=someuser,ou=mypeople,dc=nodomain | ||
| Line 76: | Line 76: | ||
mail: someuser@nodomain | mail: someuser@nodomain | ||
userPassword: {SSHA}hnP4gNK7SbgsAW3eTZYf23a4R7Ob19l2 | userPassword: {SSHA}hnP4gNK7SbgsAW3eTZYf23a4R7Ob19l2 | ||
</ | </syntaxHighlight> | ||
Use '''slappasswd -s passwordtocrypt''' to generate a password. | Use '''slappasswd -s passwordtocrypt''' to generate a password. | ||
| Line 85: | 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 | ||
< | <syntaxHighlight lang="bash"> | ||
..\db_stat -e | ..\db_stat -e | ||
</ | </syntaxHighlight> | ||
If message is the one described, launch repare of base with | If message is the one described, launch repare of base with | ||
< | <syntaxHighlight lang="bash"> | ||
..\db_recover | ..\db_recover | ||
</ | </syntaxHighlight> | ||
Server should be able to start again. | Server should be able to start again. | ||