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