removing outdated PerLDAP scripts. Only supporting the
[Samba.git] / examples / LDAP / README
blobc7ff16ad083629c91dda1fe813cc8fc99205f92c
1 !==
2 !== README File for storing smbpasswd in LDAP
3 !==
4 !== written by Gerald Carter <jerry@samba.org>
5 !==
7 This is a quick and dirty means of converting smbpasswd entries
8 to sambaAccount entriues in an LDAP directory.
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 
17         http://perl-ldap.sourceforge.net
22 OpenLDAP 2.0.x
23 --------------
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).
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)
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 
39         http://www.padl.com/tools.html
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?)
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.
50 You must restart the LDAP server for these new included schema files 
51 to become active.
54 import_smbpasswd.pl
55 ----------------------
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).
64 The following will import an smbpasswd file into an LDAP directory
66         $ cat smbpasswd | import_smbpasswd.pl
69 export_smbpasswd.pl
70 ----------------------
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
76         $ export_smbpasswd.pl > smbpasswd
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.
84 ldapsync.pl & ldapchgpasswd.pl
85 ------------------------------
86 For more information on these scripts, see
88         http://www.mami.net/univr/tng-ldap/howto/
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/
95 !==
96 !== end of README
97 !==