1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
5 >Samba as a ADS domain member
</TITLE
8 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.76b+
11 TITLE=
"SAMBA Project Documentation"
12 HREF=
"samba-howto-collection.html"><LINK
14 TITLE=
"Type of installation"
15 HREF=
"type.html"><LINK
17 TITLE=
"How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain"
18 HREF=
"samba-bdc.html"><LINK
20 TITLE=
"Samba as a NT4 domain member"
21 HREF=
"domain-security.html"></HEAD
32 SUMMARY=
"Header navigation table"
41 >SAMBA Project Documentation
</TH
63 HREF=
"domain-security.html"
76 NAME=
"ADS">Chapter
8. Samba as a ADS domain member
</H1
78 >This is a rough guide to setting up Samba
3.0 with kerberos authentication against a
81 >Pieces you need before you begin:
89 >a Windows
2000 server.
</TD
93 >samba
3.0 or higher.
</TD
97 >the MIT kerberos development libraries (either install from the above sources or use a package). The heimdal libraries will not work.
</TD
101 >the OpenLDAP development libraries.
</TD
113 NAME=
"AEN1187">8.1. Installing the required packages for Debian
</H1
115 >On Debian you need to install the following packages:
140 NAME=
"AEN1193">8.2. Installing the required packages for RedHat
</H1
142 >On RedHat this means you should have at least:
150 >krb5-workstation (for kinit)
</TD
154 >krb5-libs (for linking with)
</TD
158 >krb5-devel (because you are compiling from source)
</TD
166 >in addition to the standard development environment.
</P
168 >Note that these are not standard on a RedHat install, and you may need
169 to get them off CD2.
</P
176 NAME=
"AEN1202">8.3. Compile Samba
</H1
178 >If your kerberos libraries are in a non-standard location then
179 remember to add the configure option --with-krb5=DIR.
</P
181 >After you run configure make sure that include/config.h contains
185 CLASS=
"PROGRAMLISTING"
187 #define HAVE_LDAP
1</PRE
190 >If it doesn't then configure did not find your krb5 libraries or
191 your ldap libraries. Look in config.log to figure out why and fix
194 >Then compile and install Samba as usual. You must use at least the
195 following
3 options in smb.conf:
</P
198 CLASS=
"PROGRAMLISTING"
199 > realm = YOUR.KERBEROS.REALM
201 encrypt passwords = yes
</PRE
204 >In case samba can't figure out your ads server using your realm name, use the
213 CLASS=
"PROGRAMLISTING"
214 > ads server = your.kerberos.server
</PRE
217 >You do *not* need a smbpasswd file, although it won't do any harm
218 and if you have one then Samba will be able to fall back to normal
219 password security for older clients. I expect that the above
220 required options will change soon when we get better active
221 directory integration.
</P
228 NAME=
"AEN1217">8.4. Setup your /etc/krb5.conf
</H1
230 >The minimal configuration for krb5.conf is:
</P
233 CLASS=
"PROGRAMLISTING"
235 YOUR.KERBEROS.REALM = {
236 kdc = your.kerberos.server
240 >Test your config by doing a
"kinit USERNAME@REALM" and making sure that
241 your password is accepted by the Win2000 KDC.
</P
243 >NOTE: The realm must be uppercase.
</P
245 >You also must ensure that you can do a reverse DNS lookup on the IP
246 address of your KDC. Also, the name that this reverse lookup maps to
247 must either be the netbios name of the KDC (ie. the hostname with no
248 domain attached) or it can alternatively be the netbios name
249 followed by the realm.
</P
251 >The easiest way to ensure you get this right is to add a /etc/hosts
252 entry mapping the IP address of your KDC to its netbios name. If you
253 don't get this right then you will get a
"local error" when you try
254 to join the realm.
</P
256 >If all you want is kerberos support in smbclient then you can skip
257 straight to step
5 now. Step
3 is only needed if you want kerberos
265 NAME=
"AEN1227">8.5. Create the computer account
</H1
267 >Do a
"kinit" as a user that has authority to change arbitrary
268 passwords on the KDC (
"Administrator" is a good choice). Then as a
269 user that has write permission on the Samba private directory
280 NAME=
"AEN1231">8.5.1. Possible errors
</H2
288 >"bash: kinit: command not found"</DT
291 >kinit is in the krb5-workstation RPM on RedHat systems, and is in /usr/kerberos/bin, so it won't be in the path until you log in again (or open a new terminal)
</P
294 >"ADS support not compiled in"</DT
297 >Samba must be reconfigured (remove config.cache) and recompiled (make clean all install) after the kerberos libs and headers are installed.
</P
309 NAME=
"AEN1243">8.6. Test your server setup
</H1
311 >On a Windows
2000 client try
<B
313 >net use * \\server\share
</B
315 be logged in with kerberos without needing to know a password. If
316 this fails then run
<B
319 >. Did you get a ticket for the
320 server? Does it have an encoding type of DES-CBC-MD5 ?
</P
327 NAME=
"AEN1248">8.7. Testing with smbclient
</H1
329 >On your Samba server try to login to a Win2000 server or your Samba
330 server using smbclient and kerberos. Use smbclient as usual, but
331 specify the -k option to choose kerberos authentication.
</P
338 NAME=
"AEN1251">8.8. Notes
</H1
340 >You must change administrator password at least once after DC install,
341 to create the right encoding types
</P
343 >w2k doesn't seem to create the _kerberos._udp and _ldap._tcp in
344 their defaults DNS setup. Maybe fixed in service packs?
</P
352 SUMMARY=
"Footer navigation table"
363 HREF=
"samba-bdc.html"
372 HREF=
"samba-howto-collection.html"
381 HREF=
"domain-security.html"
391 >How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain
</TD
405 >Samba as a NT4 domain member
</TD