This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[bbaumbach/samba-autobuild/.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 converting smbpasswd entries
8 to sambaAccount entriues in an LDAP directory.
9
10
11 Pre-requisites for import_smbpasswd.pl & export_smbpasswd.pl
12 --------------------------------------------------------------
13 These two scripts are modified versions of 
14 [import|export]_smbpasswd.pl rewritten to use the Net::LDAP
15 perl module available from 
16
17         http://perl-ldap.sourceforge.net
18
19
20
21
22 OpenLDAP 2.0.x
23 --------------
24
25 A sample schema file (samba.schema) has been included for use
26 with OpenLDAP 2.0.x.  The OIDs used in this file are owned by
27 the Samba team and generated from its own Enterprise number
28 of 7165 (as issued by IANA).
29
30 Copy the samba.schema file into your /etc/openldap/schema directory,
31 and add an include for it in the /etc/openldap/slapd.conf file.
32 Note that samba.schema relies upon the uid and uidNumber attributes
33 from the RFC2307 schema (i.e. nis.schema)
34
35 If you choose to import /etc/passwd, nis, or nisplus tables 
36 into ldap, you can use migration tools provided by PADL Software 
37 which are located at 
38
39         http://www.padl.com/tools.html
40
41 It is not a requirement that a user's /etc/passwd account
42 is stored in LDAP for the samba.schema file to work (although
43 the whole point of storing smbpasswd in LDAP is to have a 
44 single location for user accounts, right?)
45
46 The padl tools will leave you with LDIF files which you can import
47 into OpenLDAP.  Before you can import them, you need to include
48 nis.schema and cosine.schema in your slapd.conf file.
49
50 You must restart the LDAP server for these new included schema files 
51 to become active.
52
53
54 import_smbpasswd.pl
55 ----------------------
56
57 Make sure you customize the local site variable in the perl script
58 (i.e. ldapserver, rootdn, rootpw, etc...).  The script reads from
59 standard input and requires that user entries already exist
60 in your directories containing the 'objectclass: posixAccount'
61 value pair.  For more information on this object and related schema,
62 refer to RFC2307 and http://www.padl.com/software.html).
63
64 The following will import an smbpasswd file into an LDAP directory
65
66         $ cat smbpasswd | import_smbpasswd.pl
67
68
69 export_smbpasswd.pl
70 ----------------------
71
72 Make sure you customize the local site variable in the perl script
73 (i.e. ldapserver, rootdn, rootpw, etc...).  You can then generate
74 an smbpasswd file by executing
75
76         $ export_smbpasswd.pl > smbpasswd
77
78 NOTE: Server side (or client side) search limites may prevent
79 all users from being listed.  Check you directory server documentation
80 for details.
81
82
83
84 ldapsync.pl & ldapchgpasswd.pl
85 ------------------------------
86 For more information on these scripts, see
87
88         http://www.mami.net/univr/tng-ldap/howto/
89
90
91 The ldapsync.pl script requires a small command (smbencrypt) 
92 for generating LanMan and NT password hashes which 
93 can be found at ftp://samba.org/pub/samba/contributed/
94
95 !==
96 !== end of README
97 !==