diff options
Diffstat (limited to 'debian/tests/smbk5pwd')
-rwxr-xr-x | debian/tests/smbk5pwd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/tests/smbk5pwd b/debian/tests/smbk5pwd new file mode 100755 index 0000000..aeb5f81 --- /dev/null +++ b/debian/tests/smbk5pwd @@ -0,0 +1,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 |