1 Samba 3.0 prealpha guide to Kerberos authentication
2 ---------------------------------------------------
7 This is a VERY ROUGH guide to setting up the current (November 2001)
8 pre-alpha version of Samba 3.0 with kerberos authentication against a
9 Windows2000 KDC. The procedures listed here are likely to change as
12 Pieces you need before you begin:
14 - a Windows 2000 server
15 - the latest CVS source code for Samba. See http://cvs.samba.org/ for how to
17 - the MIT kerberos development libraries (either install from the
18 above sources or use a package). Under debian you need "libkrb5-dev"
19 and "krb5-user". The heimdal libraries will not work.
20 - the OpenLDAP development libraries.
22 On RedHat this means you should have at least:
24 krb5-workstation (for kinit)
25 krb5-libs (for linking with)
26 krb5-devel (because you are compiling from source)
28 in addition to the standard development environment.
30 Note that these are not standard on a RedHat install, and you may need
33 Also check that you have the latest copy of this HOWTO. It is
34 available from http://samba.org/ftp/tridge/kerberos/HOWTO
38 If your kerberos libraries are in a non-standard location then
39 remember to add the configure option --with-krb5=DIR.
41 After you run configure make sure that include/config.h contains
47 If it doesn't then configure did not find your krb5 libraries or
48 your ldap libraries. Look in config.log to figure out why and fix
51 Then compile and install Samba as usual. You must use at least the
52 following 3 options in smb.conf:
54 realm = YOUR.KERBEROS.REALM
55 ads server = your.kerberos.server
57 encrypt passwords = yes
59 Strictly speaking, you can omit the realm name and you can use an IP
60 address for the ads server. In that case Samba will auto-detect these.
62 You do *not* need a smbpasswd file, although it won't do any harm
63 and if you have one then Samba will be able to fall back to normal
64 password security for older clients. I expect that the above
65 required options will change soon when we get better active
66 directory integration.
69 Step 2: Setup your /etc/krb5.conf
71 The minimal configuration for krb5.conf is:
74 YOUR.KERBEROS.REALM = {
75 kdc = your.kerberos.server
79 Test your config by doing a "kinit USERNAME@REALM" and making sure that
80 your password is accepted by the Win2000 KDC.
82 NOTE: The realm must be uppercase.
84 You also must ensure that you can do a reverse DNS lookup on the IP
85 address of your KDC. Also, the name that this reverse lookup maps to
86 must either be the netbios name of the KDC (ie. the hostname with no
87 domain attached) or it can alternatively be the netbios name
88 followed by the realm.
90 The easiest way to ensure you get this right is to add a /etc/hosts
91 entry mapping the IP address of your KDC to its netbios name. If you
92 don't get this right then you will get a "local error" when you try
95 * If all you want is kerberos support in smbclient then you can skip
96 * straight to step 5 now. Step 3 is only needed if you want kerberos
100 Step 3: Create the computer account
102 Do a "kinit" as a user that has authority to change arbitrary
103 passwords on the KDC ("Administrator" is a good choice). Then as a
104 user that has write permission on the Samba private directory
110 - "bash: kinit: command not found":
111 - kinit is in the krb5-workstation RPM on RedHat systems, and is
112 in /usr/kerberos/bin, so it won't be in the path until
113 you log in again (or open a new terminal)
114 - "ADS support not compiled in"
115 - Samba must be reconfigured (remove config.cache) and
116 recompiled (make clean all install) after the kerberos libs
117 and headers are installed.
120 Step 4: Test your server setup
122 On a Windows 2000 client try "net use * \\server\share". You should
123 be logged in with kerberos without needing to know a password. If
124 this fails then run "klist tickets". Did you get a ticket for the
125 server? Does it have an encoding type of DES-CBC-MD5 ?
127 Step 5: Testing with smbclient
129 On your Samba server try to login to a Win2000 server or your Samba
130 server using smbclient and kerberos. Use smbclient as usual, but
131 specify the -k option to choose kerberos authentication.
137 - must change administrator password at least once after DC install,
138 to create the right encoding types
140 - w2k doesn't seem to create the _kerberos._udp and _ldap._tcp in
141 their defaults DNS setup. Maybe fixed in service packs?