Start testing a few more things out of smbtorture in the build farm.
[kai/samba.git] / examples / LDAP / README
1 !==
2 !== README File for storing smbpasswd in LDAP
3 !==
4 !== written by Gerald Carter <jerry@samba.org>
5 !==
6
7 This is a quick and dirty means of storing smbpasswd entries
8 in LDAP.  Samba 2.2.x does not have any ability to grab
9 this information directly from LDAP so you will need to
10 periodically generate an smbpasswd from an ldapsearch
11 "(objectclass=smbPasswordEntry)".
12
13 Be aware of search limits on your client or server which prevent
14 all entries from being returned in the search result.
15
16
17 Pre-requisites for import_smbpasswd.pl & export_smbpasswd.pl
18 ------------------------------------------------------------
19 You must install Mozilla PerLDAP which is available at:
20
21         http://www.mozilla.org/directory
22
23 PerLDAP depends on the Netscape (aka iPlanet) C-SDK which is
24 available for download at:
25
26         http:// www.iplanet.com/downloads/developer/
27
28
29 Pre-requisites for import2_smbpasswd.pl & export2_smbpasswd.pl
30 --------------------------------------------------------------
31 These two scripts are modified versions of 
32 [import|export]_smbpasswd.pl rewritten to use the Net::LDAP
33 perl module available from 
34
35         http://perl-ldap.sourceforge.net
36
37
38
39 OpenLDAP 2.0.x
40 --------------
41
42 A sample schema file (samba.schema) has been included for use
43 with OpenLDAP 2.0.x.  The OIDs used in this file are owned by
44 the Samba team and generated from its own Enterprise number
45 of 7165 (as issued by IANA).
46
47 Copy the samba.schema file into your /etc/openldap/schema directory,
48 and add an include for it in the /etc/openldap/slapd.conf file.
49 Note that samba.schema relies upon the uid and uidNumber attributes
50 from the RFC2307 schema (i.e. nis.schema)
51
52 If you choose to import /etc/passwd, nis, or nisplus tables 
53 into ldap, you can use migration tools provided by PADL Software 
54 which are located at 
55
56         http://www.padl.com/tools.html
57
58 It is not a requirement that a user's /etc/passwd account
59 is stored in LDAP for the samba.schema file to work (although
60 the whole point of storing smbpasswd in LDAP is to have a 
61 single location for user accounts, right?)
62
63 The padl tools will leave you with LDIF files which you can import
64 into OpenLDAP.  Before you can import them, you need to include
65 nis.schema and cosine.schema in your slapd.conf file.
66
67 You must restart the LDAP server for these new included schema files 
68 to become active.
69
70
71 import[2]_smbpasswd.pl
72 ----------------------
73
74 Make sure you customize the local site variable in the perl script
75 (i.e. ldapserver, rootdn, rootpw, etc...).  The script reads from
76 standard input and requires that user entries already exist
77 in your directories containing the 'objectclass: posixAccount'
78 value pair.  For more information on this object and related schema,
79 refer to RFC2307 and http://www.padl.com/software.html).
80
81 The following will import an smbpasswd file into an LDAP directory
82
83         $ cat smbpasswd | import[2]_smbpasswd.pl
84
85
86 export[2]_smbpasswd.pl
87 ----------------------
88
89 Make sure you customize the local site variable in the perl script
90 (i.e. ldapserver, rootdn, rootpw, etc...).  You can then generate
91 an smbpasswd file by executing
92
93         $ export[2]_smbpasswd.pl > smbpasswd
94
95 NOTE: Server side (or client side) search limites may prevent
96 all users from being listed.  Check you directory server documentation
97 for details.
98
99
100
101 ldapsync.pl & ldapchgpasswd.pl
102 ------------------------------
103 For more information on these scripts, see
104
105         http://www.mami.net/univr/tng-ldap/howto/
106
107
108 The ldapsync.pl script requires a small command (smbencrypt) 
109 for generating LanMan and NT password hashes which 
110 can be found at ftp://samba.org/pub/samba/contributed/
111
112 !==
113 !== end of README
114 !==