Kuna ma olen ldap-i kohapealt ikka ilge koba siis panen siia mõne rea endale spikriks.
Kui centoses on pakist paigaltatud
Siis /etc/openldap/slapd.d/cn\=config/olcDatabase\=\{2\}bdb.ldif vajalikud muudatused
parooli saab slappasswd käsuga genereerida
openldap ja slapd käivitatud, siis peaks:
ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts andma:
# extended LDIF
#
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts
#
#
dn:
namingContexts: dc=vivalte,dc=com
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
Loome base entry – näiteks faili nimega base.ldif sisuga:
# Organization for Example Corporation
dn: dc=example,dc=com
objectClass: dcObject
objectClass: organization
dc: example
o: Example
description: Example
# Organizational Role for Directory Manager
dn: cn=Manager,dc=example,dc=com
objectClass: organizationalRole
cn: Manager
description: Directory Manager
Lisame baasi kirje:
ldapadd -f base.ldif -x -D “cn=Manager,dc=example,dc=com” -w secret
slapcat peaks andma tagasi ka lisatud kirje
ldapsearch -h localhost -D “cn=Manager,dc=example,dc=com” -b “dc=example,dc=com” -w secret “(uid=mina)”