Regenerate docs
[kamenim/samba-autobuild/.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-member.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-member.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 9. Samba as a ADS domain member</H1
78 ><DIV
79 CLASS="TOC"
80 ><DL
81 ><DT
82 ><B
83 >Table of Contents</B
84 ></DT
85 ><DT
86 >9.1. <A
87 HREF="ads.html#AEN1363"
88 >Setup your <TT
89 CLASS="FILENAME"
90 >smb.conf</TT
91 ></A
92 ></DT
93 ><DT
94 >9.2. <A
95 HREF="ads.html#AEN1376"
96 >Setup your <TT
97 CLASS="FILENAME"
98 >/etc/krb5.conf</TT
99 ></A
100 ></DT
101 ><DT
102 >9.3. <A
103 HREF="ads.html#ADS-CREATE-MACHINE-ACCOUNT"
104 >Create the computer account</A
105 ></DT
106 ><DT
107 >9.4. <A
108 HREF="ads.html#ADS-TEST-SERVER"
109 >Test your server setup</A
110 ></DT
111 ><DT
112 >9.5. <A
113 HREF="ads.html#ADS-TEST-SMBCLIENT"
114 >Testing with <SPAN
115 CLASS="APPLICATION"
116 >smbclient</SPAN
117 ></A
118 ></DT
119 ><DT
120 >9.6. <A
121 HREF="ads.html#AEN1424"
122 >Notes</A
123 ></DT
124 ></DL
125 ></DIV
126 ><P
127 >This is a rough guide to setting up Samba 3.0 with kerberos authentication against a
128 Windows2000 KDC. </P
129 ><DIV
130 CLASS="SECT1"
131 ><H1
132 CLASS="SECT1"
133 ><A
134 NAME="AEN1363"
135 >9.1. Setup your <TT
136 CLASS="FILENAME"
137 >smb.conf</TT
138 ></A
139 ></H1
140 ><P
141 >You must use at least the following 3 options in smb.conf:</P
142 ><P
143 ><PRE
144 CLASS="PROGRAMLISTING"
145 >  realm = YOUR.KERBEROS.REALM
146   security = ADS
147   encrypt passwords = yes</PRE
148 ></P
149 ><P
150 >In case samba can't figure out your ads server using your realm name, use the 
151 <B
152 CLASS="COMMAND"
153 >ads server</B
154 > option in <TT
155 CLASS="FILENAME"
156 >smb.conf</TT
157 >:
158 <PRE
159 CLASS="PROGRAMLISTING"
160 >  ads server = your.kerberos.server</PRE
161 ></P
162 ><DIV
163 CLASS="NOTE"
164 ><P
165 ></P
166 ><TABLE
167 CLASS="NOTE"
168 WIDTH="100%"
169 BORDER="0"
170 ><TR
171 ><TD
172 WIDTH="25"
173 ALIGN="CENTER"
174 VALIGN="TOP"
175 ><IMG
176 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
177 HSPACE="5"
178 ALT="Note"></TD
179 ><TD
180 ALIGN="LEFT"
181 VALIGN="TOP"
182 ><P
183 >You do *not* need a smbpasswd file, and older clients will
184   be authenticated as if <B
185 CLASS="COMMAND"
186 >security = domain</B
187 >,
188   although it won't do any harm
189   and allows you to have local users not in the domain.
190   I expect that the above required options will change soon when we get better
191   active directory integration.</P
192 ></TD
193 ></TR
194 ></TABLE
195 ></DIV
196 ></DIV
197 ><DIV
198 CLASS="SECT1"
199 ><H1
200 CLASS="SECT1"
201 ><A
202 NAME="AEN1376"
203 >9.2. Setup your <TT
204 CLASS="FILENAME"
205 >/etc/krb5.conf</TT
206 ></A
207 ></H1
208 ><P
209 >The minimal configuration for <TT
210 CLASS="FILENAME"
211 >krb5.conf</TT
212 > is:</P
213 ><P
214 ><PRE
215 CLASS="PROGRAMLISTING"
216 >[realms]
217     YOUR.KERBEROS.REALM = {
218         kdc = your.kerberos.server
219     }</PRE
220 ></P
221 ><P
222 >Test your config by doing a <KBD
223 CLASS="USERINPUT"
224 >kinit <VAR
225 CLASS="REPLACEABLE"
226 >USERNAME</VAR
227 >@<VAR
228 CLASS="REPLACEABLE"
229 >REALM</VAR
230 ></KBD
231 > and making sure that
232   your password is accepted by the Win2000 KDC. </P
233 ><DIV
234 CLASS="NOTE"
235 ><P
236 ></P
237 ><TABLE
238 CLASS="NOTE"
239 WIDTH="100%"
240 BORDER="0"
241 ><TR
242 ><TD
243 WIDTH="25"
244 ALIGN="CENTER"
245 VALIGN="TOP"
246 ><IMG
247 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
248 HSPACE="5"
249 ALT="Note"></TD
250 ><TD
251 ALIGN="LEFT"
252 VALIGN="TOP"
253 ><P
254 >The realm must be uppercase. </P
255 ></TD
256 ></TR
257 ></TABLE
258 ></DIV
259 ><P
260 >You also must ensure that you can do a reverse DNS lookup on the IP
261 address of your KDC. Also, the name that this reverse lookup maps to
262 must either be the netbios name of the KDC (ie. the hostname with no
263 domain attached) or it can alternatively be the netbios name
264 followed by the realm. </P
265 ><P
266 >The easiest way to ensure you get this right is to add a 
267 <TT
268 CLASS="FILENAME"
269 >/etc/hosts</TT
270 > entry mapping the IP address of your KDC to 
271 its netbios name. If you don't get this right then you will get a 
272 "local error" when you try to join the realm.</P
273 ><P
274 >If all you want is kerberos support in <SPAN
275 CLASS="APPLICATION"
276 >smbclient</SPAN
277 > then you can skip
278 straight to <A
279 HREF="ads.html#ADS-TEST-SMBCLIENT"
280 >Test with <SPAN
281 CLASS="APPLICATION"
282 >smbclient</SPAN
283 ></A
284 > now. 
285 <A
286 HREF="ads.html#ADS-CREATE-MACHINE-ACCOUNT"
287 >Creating a computer account</A
288
289 and <A
290 HREF="ads.html#ADS-TEST-SERVER"
291 >testing your servers</A
292 >
293 is only needed if you want kerberos
294 support for <SPAN
295 CLASS="APPLICATION"
296 >smbd</SPAN
297 > and <SPAN
298 CLASS="APPLICATION"
299 >winbindd</SPAN
300 >.</P
301 ></DIV
302 ><DIV
303 CLASS="SECT1"
304 ><H1
305 CLASS="SECT1"
306 ><A
307 NAME="ADS-CREATE-MACHINE-ACCOUNT"
308 >9.3. Create the computer account</A
309 ></H1
310 ><P
311 >As a user that has write permission on the Samba private directory
312 (usually root) run:
313 <KBD
314 CLASS="USERINPUT"
315 >net ads join</KBD
316 ></P
317 ><DIV
318 CLASS="SECT2"
319 ><H2
320 CLASS="SECT2"
321 ><A
322 NAME="AEN1404"
323 >9.3.1. Possible errors</A
324 ></H2
325 ><P
326 ><P
327 ></P
328 ><DIV
329 CLASS="VARIABLELIST"
330 ><DL
331 ><DT
332 >"ADS support not compiled in"</DT
333 ><DD
334 ><P
335 >Samba must be reconfigured (remove config.cache) and recompiled (make clean all install) after the kerberos libs and headers are installed.</P
336 ></DD
337 ></DL
338 ></DIV
339 ></P
340 ></DIV
341 ></DIV
342 ><DIV
343 CLASS="SECT1"
344 ><H1
345 CLASS="SECT1"
346 ><A
347 NAME="ADS-TEST-SERVER"
348 >9.4. Test your server setup</A
349 ></H1
350 ><P
351 >On a Windows 2000 client try <KBD
352 CLASS="USERINPUT"
353 >net use * \\server\share</KBD
354 >. You should
355 be logged in with kerberos without needing to know a password. If
356 this fails then run <KBD
357 CLASS="USERINPUT"
358 >klist tickets</KBD
359 >. Did you get a ticket for the
360 server? Does it have an encoding type of DES-CBC-MD5 ? </P
361 ></DIV
362 ><DIV
363 CLASS="SECT1"
364 ><H1
365 CLASS="SECT1"
366 ><A
367 NAME="ADS-TEST-SMBCLIENT"
368 >9.5. Testing with <SPAN
369 CLASS="APPLICATION"
370 >smbclient</SPAN
371 ></A
372 ></H1
373 ><P
374 >On your Samba server try to login to a Win2000 server or your Samba
375 server using <SPAN
376 CLASS="APPLICATION"
377 >smbclient</SPAN
378 > and kerberos. Use <SPAN
379 CLASS="APPLICATION"
380 >smbclient</SPAN
381 > as usual, but
382 specify the <VAR
383 CLASS="PARAMETER"
384 >-k</VAR
385 > option to choose kerberos authentication.</P
386 ></DIV
387 ><DIV
388 CLASS="SECT1"
389 ><H1
390 CLASS="SECT1"
391 ><A
392 NAME="AEN1424"
393 >9.6. Notes</A
394 ></H1
395 ><P
396 >You must change administrator password at least once after DC 
397 install, to create the right encoding types</P
398 ><P
399 >w2k doesn't seem to create the _kerberos._udp and _ldap._tcp in
400    their defaults DNS setup. Maybe fixed in service packs?</P
401 ></DIV
402 ></DIV
403 ><DIV
404 CLASS="NAVFOOTER"
405 ><HR
406 ALIGN="LEFT"
407 WIDTH="100%"><TABLE
408 SUMMARY="Footer navigation table"
409 WIDTH="100%"
410 BORDER="0"
411 CELLPADDING="0"
412 CELLSPACING="0"
413 ><TR
414 ><TD
415 WIDTH="33%"
416 ALIGN="left"
417 VALIGN="top"
418 ><A
419 HREF="samba-bdc.html"
420 ACCESSKEY="P"
421 >Prev</A
422 ></TD
423 ><TD
424 WIDTH="34%"
425 ALIGN="center"
426 VALIGN="top"
427 ><A
428 HREF="samba-howto-collection.html"
429 ACCESSKEY="H"
430 >Home</A
431 ></TD
432 ><TD
433 WIDTH="33%"
434 ALIGN="right"
435 VALIGN="top"
436 ><A
437 HREF="domain-member.html"
438 ACCESSKEY="N"
439 >Next</A
440 ></TD
441 ></TR
442 ><TR
443 ><TD
444 WIDTH="33%"
445 ALIGN="left"
446 VALIGN="top"
447 >Samba Backup Domain Controller to Samba Domain Control</TD
448 ><TD
449 WIDTH="34%"
450 ALIGN="center"
451 VALIGN="top"
452 ><A
453 HREF="type.html"
454 ACCESSKEY="U"
455 >Up</A
456 ></TD
457 ><TD
458 WIDTH="33%"
459 ALIGN="right"
460 VALIGN="top"
461 >Samba as a NT4 or Win2k domain member</TD
462 ></TR
463 ></TABLE
464 ></DIV
465 ></BODY
466 ></HTML
467 >