› Foros › PC › Software libre
aptitude install slapd ldap-utils
ldapadd -Y EXTERNAL -H ldapi:/// /etc/ldap/schema/cosine.ldif
ldapadd -Y EXTERNAL -H ldapi:/// /etc/ldap/schema/nis.ldif
ldapadd -Y EXTERNAL -H ldapi:/// /etc/ldap/schema/inetorgperson.ldif
# Load dynamic backend modules
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb.la
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=ejemplo,dc=com
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=ejemplo,dc=com
olcRootPW: password
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=ejemplo,dc=com" 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=ejemplo,dc=com" write by * read
ldapadd -Y EXTERNAL -H ldapi:/// -f config.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=module,cn=config"
adding new entry "olcDatabase=hdb,cn=config"
ldap_add: Other (e.g., implementation specific) error (80)
additional info: <olcRootPW> can only be set when rootdn is under suffix