Regenerate docs
[ira/wip.git] / docs / htmldocs / ads.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Samba as a ADS domain member</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
9 REL="HOME"
10 TITLE="SAMBA Project Documentation"
11 HREF="samba-howto-collection.html"><LINK
12 REL="UP"
13 TITLE="Type of installation"
14 HREF="type.html"><LINK
15 REL="PREVIOUS"
16 TITLE="Samba Backup Domain Controller to Samba Domain Control"
17 HREF="samba-bdc.html"><LINK
18 REL="NEXT"
19 TITLE="Samba as a NT4 or Win2k domain member"
20 HREF="domain-security.html"></HEAD
21 ><BODY
22 CLASS="CHAPTER"
23 BGCOLOR="#FFFFFF"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 SUMMARY="Header navigation table"
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >SAMBA Project Documentation</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="samba-bdc.html"
49 ACCESSKEY="P"
50 >Prev</A
51 ></TD
52 ><TD
53 WIDTH="80%"
54 ALIGN="center"
55 VALIGN="bottom"
56 ></TD
57 ><TD
58 WIDTH="10%"
59 ALIGN="right"
60 VALIGN="bottom"
61 ><A
62 HREF="domain-security.html"
63 ACCESSKEY="N"
64 >Next</A
65 ></TD
66 ></TR
67 ></TABLE
68 ><HR
69 ALIGN="LEFT"
70 WIDTH="100%"></DIV
71 ><DIV
72 CLASS="CHAPTER"
73 ><H1
74 ><A
75 NAME="ADS"
76 ></A
77 >Chapter 8. Samba as a ADS domain member</H1
78 ><P
79 >This is a rough guide to setting up Samba 3.0 with kerberos authentication against a
80 Windows2000 KDC. </P
81 ><DIV
82 CLASS="SECT1"
83 ><H1
84 CLASS="SECT1"
85 ><A
86 NAME="AEN1336"
87 >8.1. Setup your <TT
88 CLASS="FILENAME"
89 >smb.conf</TT
90 ></A
91 ></H1
92 ><P
93 >You must use at least the following 3 options in smb.conf:</P
94 ><P
95 ><PRE
96 CLASS="PROGRAMLISTING"
97 >  realm = YOUR.KERBEROS.REALM
98   security = ADS
99   encrypt passwords = yes</PRE
100 ></P
101 ><P
102 >In case samba can't figure out your ads server using your realm name, use the 
103 <B
104 CLASS="COMMAND"
105 >ads server</B
106 > option in <TT
107 CLASS="FILENAME"
108 >smb.conf</TT
109 >:
110 <PRE
111 CLASS="PROGRAMLISTING"
112 >  ads server = your.kerberos.server</PRE
113 ></P
114 ><DIV
115 CLASS="NOTE"
116 ><P
117 ></P
118 ><TABLE
119 CLASS="NOTE"
120 WIDTH="100%"
121 BORDER="0"
122 ><TR
123 ><TD
124 WIDTH="25"
125 ALIGN="CENTER"
126 VALIGN="TOP"
127 ><IMG
128 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
129 HSPACE="5"
130 ALT="Note"></TD
131 ><TD
132 ALIGN="LEFT"
133 VALIGN="TOP"
134 ><P
135 >You do *not* need a smbpasswd file, and older clients will
136   be authenticated as if <B
137 CLASS="COMMAND"
138 >security = domain</B
139 >,
140   although it won't do any harm
141   and allows you to have local users not in the domain.
142   I expect that the above required options will change soon when we get better
143   active directory integration.</P
144 ></TD
145 ></TR
146 ></TABLE
147 ></DIV
148 ></DIV
149 ><DIV
150 CLASS="SECT1"
151 ><H1
152 CLASS="SECT1"
153 ><A
154 NAME="AEN1349"
155 >8.2. Setup your <TT
156 CLASS="FILENAME"
157 >/etc/krb5.conf</TT
158 ></A
159 ></H1
160 ><P
161 >The minimal configuration for <TT
162 CLASS="FILENAME"
163 >krb5.conf</TT
164 > is:</P
165 ><P
166 ><PRE
167 CLASS="PROGRAMLISTING"
168 >[realms]
169     YOUR.KERBEROS.REALM = {
170         kdc = your.kerberos.server
171     }</PRE
172 ></P
173 ><P
174 >Test your config by doing a <KBD
175 CLASS="USERINPUT"
176 >kinit <VAR
177 CLASS="REPLACEABLE"
178 >USERNAME</VAR
179 >@<VAR
180 CLASS="REPLACEABLE"
181 >REALM</VAR
182 ></KBD
183 > and making sure that
184   your password is accepted by the Win2000 KDC. </P
185 ><DIV
186 CLASS="NOTE"
187 ><P
188 ></P
189 ><TABLE
190 CLASS="NOTE"
191 WIDTH="100%"
192 BORDER="0"
193 ><TR
194 ><TD
195 WIDTH="25"
196 ALIGN="CENTER"
197 VALIGN="TOP"
198 ><IMG
199 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
200 HSPACE="5"
201 ALT="Note"></TD
202 ><TD
203 ALIGN="LEFT"
204 VALIGN="TOP"
205 ><P
206 >The realm must be uppercase. </P
207 ></TD
208 ></TR
209 ></TABLE
210 ></DIV
211 ><P
212 >You also must ensure that you can do a reverse DNS lookup on the IP
213 address of your KDC. Also, the name that this reverse lookup maps to
214 must either be the netbios name of the KDC (ie. the hostname with no
215 domain attached) or it can alternatively be the netbios name
216 followed by the realm. </P
217 ><P
218 >The easiest way to ensure you get this right is to add a 
219 <TT
220 CLASS="FILENAME"
221 >/etc/hosts</TT
222 > entry mapping the IP address of your KDC to 
223 its netbios name. If you don't get this right then you will get a 
224 "local error" when you try to join the realm.</P
225 ><P
226 >If all you want is kerberos support in smbclient then you can skip
227 straight to <A
228 HREF="ads.html#ADS-TEST-SMBCLIENT"
229 >Test with smbclient</A
230 > now. 
231 <A
232 HREF="ads.html#ADS-CREATE-MACHINE-ACCOUNT"
233 >Creating a computer account</A
234
235 and <A
236 HREF="ads.html#ADS-TEST-SERVER"
237 >testing your servers</A
238 >
239 is only needed if you want kerberos
240 support for smbd and winbindd.</P
241 ></DIV
242 ><DIV
243 CLASS="SECT1"
244 ><H1
245 CLASS="SECT1"
246 ><A
247 NAME="ADS-CREATE-MACHINE-ACCOUNT"
248 >8.3. Create the computer account</A
249 ></H1
250 ><P
251 >As a user that has write permission on the Samba private directory
252 (usually root) run:
253 <KBD
254 CLASS="USERINPUT"
255 >net ads join</KBD
256 ></P
257 ><DIV
258 CLASS="SECT2"
259 ><H2
260 CLASS="SECT2"
261 ><A
262 NAME="AEN1373"
263 >8.3.1. Possible errors</A
264 ></H2
265 ><P
266 ><P
267 ></P
268 ><DIV
269 CLASS="VARIABLELIST"
270 ><DL
271 ><DT
272 >"ADS support not compiled in"</DT
273 ><DD
274 ><P
275 >Samba must be reconfigured (remove config.cache) and recompiled (make clean all install) after the kerberos libs and headers are installed.</P
276 ></DD
277 ></DL
278 ></DIV
279 ></P
280 ></DIV
281 ></DIV
282 ><DIV
283 CLASS="SECT1"
284 ><H1
285 CLASS="SECT1"
286 ><A
287 NAME="ADS-TEST-SERVER"
288 >8.4. Test your server setup</A
289 ></H1
290 ><P
291 >On a Windows 2000 client try <KBD
292 CLASS="USERINPUT"
293 >net use * \\server\share</KBD
294 >. You should
295 be logged in with kerberos without needing to know a password. If
296 this fails then run <KBD
297 CLASS="USERINPUT"
298 >klist tickets</KBD
299 >. Did you get a ticket for the
300 server? Does it have an encoding type of DES-CBC-MD5 ? </P
301 ></DIV
302 ><DIV
303 CLASS="SECT1"
304 ><H1
305 CLASS="SECT1"
306 ><A
307 NAME="ADS-TEST-SMBCLIENT"
308 >8.5. Testing with smbclient</A
309 ></H1
310 ><P
311 >On your Samba server try to login to a Win2000 server or your Samba
312 server using smbclient and kerberos. Use smbclient as usual, but
313 specify the <VAR
314 CLASS="PARAMETER"
315 >-k</VAR
316 > option to choose kerberos authentication.</P
317 ></DIV
318 ><DIV
319 CLASS="SECT1"
320 ><H1
321 CLASS="SECT1"
322 ><A
323 NAME="AEN1390"
324 >8.6. Notes</A
325 ></H1
326 ><P
327 >You must change administrator password at least once after DC 
328 install, to create the right encoding types</P
329 ><P
330 >w2k doesn't seem to create the _kerberos._udp and _ldap._tcp in
331    their defaults DNS setup. Maybe fixed in service packs?</P
332 ></DIV
333 ></DIV
334 ><DIV
335 CLASS="NAVFOOTER"
336 ><HR
337 ALIGN="LEFT"
338 WIDTH="100%"><TABLE
339 SUMMARY="Footer navigation table"
340 WIDTH="100%"
341 BORDER="0"
342 CELLPADDING="0"
343 CELLSPACING="0"
344 ><TR
345 ><TD
346 WIDTH="33%"
347 ALIGN="left"
348 VALIGN="top"
349 ><A
350 HREF="samba-bdc.html"
351 ACCESSKEY="P"
352 >Prev</A
353 ></TD
354 ><TD
355 WIDTH="34%"
356 ALIGN="center"
357 VALIGN="top"
358 ><A
359 HREF="samba-howto-collection.html"
360 ACCESSKEY="H"
361 >Home</A
362 ></TD
363 ><TD
364 WIDTH="33%"
365 ALIGN="right"
366 VALIGN="top"
367 ><A
368 HREF="domain-security.html"
369 ACCESSKEY="N"
370 >Next</A
371 ></TD
372 ></TR
373 ><TR
374 ><TD
375 WIDTH="33%"
376 ALIGN="left"
377 VALIGN="top"
378 >Samba Backup Domain Controller to Samba Domain Control</TD
379 ><TD
380 WIDTH="34%"
381 ALIGN="center"
382 VALIGN="top"
383 ><A
384 HREF="type.html"
385 ACCESSKEY="U"
386 >Up</A
387 ></TD
388 ><TD
389 WIDTH="33%"
390 ALIGN="right"
391 VALIGN="top"
392 >Samba as a NT4 or Win2k domain member</TD
393 ></TR
394 ></TABLE
395 ></DIV
396 ></BODY
397 ></HTML
398 >