Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello everybody i have some error when try to add a user in my LDAP who will ues asterisk
this is my ldif file :
#OU asterisk
###
dn: ou=asterisk,dc=asterisk,dc=local
objectClass: top
objectClass: organizationalUnit
ou: asterisk
###
# OU users
###
dn: ou=users,ou=asterisk,dc=asterisk,dc=local
objectClass: top
objectClass: organizationalUnit
ou: users
###
# OU extensions
###
dn: ou=extensions,ou=asterisk,dc=asterisk,dc=local
objectClass: top
objectClass: organizationalUnit
ou: extensions
this is my slapd.conf
# more /etc/ldap/slapd.conf
# Les schémas à inclure à l'annuaire
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/asterisk.schema
# le fichier contenant le PID du processus
pidfile /var/run/slapd/slapd.pid
# Le fichier contenant les arguments
argsfile /var/run/slapd/slapd.args
# La facilité utilisée avec syslog
loglevel none
# Emplacement des modules
modulepath /usr/lib/ldap
# Chargment de modules permettant d'étendre les fonctionnalités de OpenLDAP
moduleload back_hdb
# Limites concernant les recherches
sizelimit 500
tool-threads 1
##################################
# Définition du premier annuaire #
##################################
# On utilise un stockage basé sur le format de fichier HDB
backend hdb
database hdb
# On définit la racine de l'arbre (on parle de suffixe ou de basedn)
suffix "dc=asterisk,dc=local"
# Répertoire stockant les données de l'annuaire, dans notre cas, des fichiers au format HDB
directory "/var/lib/ldap"
# L'administrateur de l'annuaire
rootdn "cn=admin,dc=asterisk,dc=local"
rootpw passer
#{SSHA}5PVllmX/nRxWiE0SEtSHfYFdbbCmYYDz # en clair ou généré via la commande slappasswd
# Des paramêtres d'optimisation du format HDB
dbconfig set_cachesize 0 2097152 0
dbconfig set_lk_max_objects 1500
dbconfig set_lk_max_locks 1500
dbconfig set_lk_max_lockers 1500
# Les attributs à indexer en vue d'améliorer drastiquement les recherches
index objectClass eq
# à commenter ...
lastmod on
checkpoint 512 30
# contrôle d'accès aux attributs sensibles
access to attrs=userPassword,shadowLastChange
by dn="cn=admin,dc=asterisk,dc=local" write
by anonymous auth
by self write
by * none
# Annuaire avec accès anonyme en lecture seule
access to dn.base=""
by * read
access to *
by dn="cn=admin,dc=asterisk,dc=local" write
by * read
AND i have create a script to add the user his name is "adduser.sh"
#!/bin/sh
root@asterisk:/etc/asterisk# ./adduser.sh
Entrez le nom du nouvel utilisateur :
diallo
Quel numéro voulez vous attribuer pour diallo ?
1200
Mot de passe Asterisk pour diallo :
Ajout de diallo dans asterisk !
Enter LDAP Password:
ldapadd: attributeDescription "dn": (possible missing newline after line 23, entry "uid=diallo,ou=users,ou=asterisk,dc=asterisk,dc=local"?)
adding new entry "uid=diallo,ou=users,ou=asterisk,dc=asterisk,dc=local"
ldap_add: Type or value exists (20)
additional info: objectClass: value #0 provided more than once
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.