preparing for release of alpha.2.5.2
[Samba.git] / docs / textdocs / LDAP.txt
blobf479d7e5842b1a01643873821efb1dcb13f576eb
1 !==
2 !== LDAP.txt for Samba release TNG-alpha 02 May 2000
3 !==
5 TITLE INFORMATION: LDAP Support in Samba 
6 AUTHOR INFORMATION: Matthew Chapman 
7 DATE INFORMATION: 29th November 1998
9 WARNING: This is experimental code. Use at your own risk, and please report
10 any bugs (after reading BUGS.txt).
12 Contents 
14 1: What is LDAP? 
15 2: Why LDAP and Samba? 
16 3: Using LDAP with Samba 
17 4: Using LDAP for Unix authentication 
18 5: Compatibility with Active Directory 
20 1: What is LDAP?
22 A directory is a type of hierarchical database optimised for simple query
23 operations, often used for storing user information. LDAP is the
24 Lightweight Directory Access Protocol, a protocol which is rapidly
25 becoming the Internet standard for accessing directories. 
27 Many client applications now support LDAP (including Microsoft's Active
28 Directory), and there are a number of servers available. The most popular
29 implementation for Unix is from the University of Michigan; its
30 homepage is at http://www.umich.edu/~dirsvcs/ldap/. 
32 Information in an LDAP tree always comes in attribute=value pairs.
33 The following is an example of a Samba user entry: 
35 uid=jbloggs, dc=samba, dc=org
36 objectclass=sambaAccount
37 uid=jbloggs
38 cn=Joe Bloggs
39 description=Samba User
40 uidNumber=500
41 gidNumber=500
42 rid=2000
43 grouprid=2001
44 lmPassword=46E389809F8D55BB78A48108148AD508
45 ntPassword=1944CCE1AD6F80D8AEC9FC5BE77696F4
46 pwdLastSet=35C11F1B
47 smbHome=\\samba1\jbloggs
48 homeDrive=Z
49 script=logon.bat
50 profile=\\samba1\jbloggs\profile
51 workstations=JOE 
53 Note that the top line is a special set of attributes called a
54 distinguished name which identifies the location of this entry beneath
55 the directory's root node. Recent Internet standards suggest the use of
56 domain-based naming using dc attributes (for instance, a microsoft.com
57 directory should have a root node of dc=microsoft, dc=com), although
58 this is not strictly necessary for isolated servers. 
60 There are a number of LDAP-related FAQ's on the internet, although
61 generally the best source of information is the documentation for the
62 individual servers. 
64 2: Why LDAP and Samba?
66 Using an LDAP directory allows Samba to store user and group information
67 more reliably and flexibly than the current combination of smbpasswd,
68 smbgroup, groupdb and aliasdb with the Unix databases. If a need emerges
69 for extra user information to be stored, this can easily be added without
70 loss of backwards compatibility. 
72 In addition, the Samba LDAP schema is compatible with RFC2307, allowing
73 Unix password database information to be stored in the same entries. This
74 provides a single, consistent repository for both Unix and Windows user
75 information. 
77 3: Using LDAP with Samba
79 1 Install and configure an LDAP server if you do not already have
80 one. You should read your LDAP server's documentation and set up the
81 configuration file and access control as desired. 
83 2 Build Samba (latest CVS is required) with: 
85         ./configure --with-ldap
86         make clean; make install 
88 3 Add the following options to the global section of smb.conf as
89 required. 
91 o ldap suffix 
93 This parameter specifies the node of the LDAP tree beneath which
94 Samba should store its information. This parameter MUST be provided
95 when using LDAP with Samba. 
97 Default: none 
99 Example: ldap suffix = "dc=mydomain, dc=org" 
101 o ldap bind as 
103 This parameter specifies the entity to bind to an LDAP directory as.
104 Usually it should be safe to use the LDAP root account; for larger
105 installations it may be preferable to restrict Samba's access. 
107 Default: none (bind anonymously) 
109 Example: ldap bind as = "uid=root, dc=mydomain, dc=org" 
111 o ldap passwd file 
113 This parameter specifies a file containing the password with which
114 Samba should bind to an LDAP server. For obvious security reasons
115 this file must be set to mode 700 or less. 
117 Default: none (bind anonymously) 
119 Example: ldap passwd file = /usr/local/samba/private/ldappasswd 
121 o ldap server 
123 This parameter specifies the DNS name of the LDAP server to use
124 when storing and retrieving information about Samba users and
125 groups. 
127 Default: ldap server = localhost 
129 o ldap port 
131 This parameter specifies the TCP port number of the LDAP server. 
133 Default: ldap port = 389 
135 4 You should then be able to use the normal smbpasswd(8) command for
136 account administration (or User Manager in the near future). 
138 4: Using LDAP for Unix authentication
140 The Samba LDAP code was designed to utilise RFC2307-compliant directory 
141 entries if available. RFC2307 is a proposed standard for LDAP user
142 information which has been adopted by a number of vendors. Further
143 information is available at http://www.xedoc.com.au/~lukeh/ldap/. 
145 Of particular interest is Luke Howard's nameservice switch module
146 (nss_ldap) and PAM module (pam_ldap) implementing this standard, providing
147 LDAP-based password databases for Unix. If you are setting up a server to
148 provide integrated Unix/NT services than these are worth investigating. 
150 5: Compatibility with Active Directory
152 The current implementation is not designed to be used with Microsoft
153 Active Directory, although compatibility may be added in the future.