1 This directory contains a slapd overlay, smbk5pwd, that extends the
2 PasswordModify Extended Operation to update Kerberos keys and Samba
3 password hashes for an LDAP user.
5 The Kerberos support is written for Heimdal using its hdb-ldap backend.
6 If a PasswordModify is performed on an entry that has the krb5KDCEntry
7 objectclass, then the krb5Key and krb5KeyVersionNumber will be updated
8 using the new password in the PasswordModify request. Additionally, a
9 new "{K5KEY}" password hash mechanism is provided. For krb5KDCEntries that
10 have this hash specifier in their userPassword attribute, Simple Binds
11 will be checked against the Kerberos keys of the Entry. No data is
12 needed after the "{K5KEY}" hash specifier in the userPassword, it is
13 looked up from the Entry directly.
15 The Samba support is written using the Samba 3.0 LDAP schema. If a
16 PasswordModify is performed on an entry that has the sambaSamAccount
17 objectclass, then the sambaLMPassword, sambaNTPassword, and sambaPwdLastSet
18 attributes will be updated accordingly.
20 To use the overlay, add:
22 include <path to>/krb5-kdc.schema
23 include <path to>/samba.schema
25 moduleload <path to>smbk5pwd.so
32 to your slapd configuration file. (You should obtain the necessary schema
33 files from the Heimdal and/or Samba distributions. At this time, there
34 are several known errors in these schema files that you will have to
35 correct before they will load in slapd. As of Samba 3.0 the schema looks
38 All modules compiled in (i.e. krb5 and samba) are enabled; the statement
40 smbk5pwd-enable <module>
42 can be used to enable only the desired one(s); legal values for <module>
43 are "krb5", "samba" and "shadow", if they are respectively enabled by defining
44 DO_KRB5, DO_SAMBA and DO_SHADOW.
46 The samba module also supports the
48 smbk5pwd-must-change <seconds>
50 which sets the "sambaPwdMustChange" attribute accordingly to force passwd
51 expiry. A value of 0 disables this feature.
53 The overlay now supports table-driven configuration, and thus can be run-time
54 loaded and configured via back-config. The layout of the entry is
56 # {0}smbk5pwd, {1}bdb, config
57 dn: olcOverlay={0}smbk5pwd,olcDatabase={1}bdb,cn=config
58 objectClass: olcOverlayConfig
59 objectClass: olcSmbK5PwdConfig
60 olcOverlay: {0}smbk5pwd
61 olcSmbK5PwdEnable: krb5
62 olcSmbK5PwdEnable: samba
63 olcSmbK5PwdMustChange: 2592000
65 which enables both krb5 and samba modules with a password expiry time
68 The provided Makefile builds both Kerberos and Samba support by default.
69 You must edit the Makefile to insure that the correct include and library
70 paths are used. You can change the DEFS macro if you only want one or the
71 other of Kerberos or Samba support.
73 This overlay is only set up to be built as a dynamically loaded module.
74 On most platforms, in order for the module to be usable, all of the
75 library dependencies must also be available as shared libraries.
77 If you need to build the overlay statically, you will have to move it into the
78 slapd/overlays directory and edit the Makefile and overlays.c to reference
79 it. You will also have to define SLAPD_OVER_SMBK5PWD to SLAPD_MOD_STATIC,
80 and add the relevant libraries to the main slapd link command.
83 This work is part of OpenLDAP Software <http://www.openldap.org/>.
84 Copyright 2004-2017 The OpenLDAP Foundation.
85 Portions Copyright 2004-2005 Howard Chu, Symas Corp. All rights reserved.
87 Redistribution and use in source and binary forms, with or without
88 modification, are permitted only as authorized by the OpenLDAP
91 A copy of this license is available in the file LICENSE in the
92 top-level directory of the distribution or, alternatively, at
93 <http://www.OpenLDAP.org/license.html>.