blob: aeb5f8150314edf2e50f8d3cc67322d473c86696 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
set -e
# Import the Samba and Heimdal schemas
ldapadd -H ldapi:// -Y EXTERNAL -f /usr/share/doc/samba/examples/LDAP/samba.ldif
schema2ldif /etc/ldap/schema/hdb.schema | ldapadd -H ldapi:// -Y EXTERNAL
# Grant slapd access to the Heimdal master key
chgrp openldap /var/lib/heimdal-kdc /var/lib/heimdal-kdc/*key
chmod g+rX /var/lib/heimdal-kdc /var/lib/heimdal-kdc/*key
# Instantiate the smbk5pwd overlay
ldapmodify -H ldapi:// -Y EXTERNAL << eof
dn: cn=module{0},cn=config
changetype: modify
add: olcModuleLoad
olcModuleLoad: smbk5pwd
dn: olcOverlay=smbk5pwd,olcDatabase={1}mdb,cn=config
changetype: add
objectClass: olcSmbK5PwdConfig
olcSmbK5PwdEnable: krb5
olcSmbK5PwdEnable: samba
olcSmbK5PwdEnable: shadow
eof
|