Penguin
Diff: ActiveDirectorySamba
EditPageHistoryDiffInfoLikePages

Differences between version 23 and revision by previous author of ActiveDirectorySamba.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 23 Last edited on Thursday, June 17, 2004 11:25:38 am by GreigMcGill Revert
Older page: version 20 Last edited on Wednesday, June 2, 2004 8:33:29 am by DougGoldstein Revert
@@ -1,5 +1,5 @@
-This simple guide is a mostly accurate way to set up a Samba machine as a domain member in a Windows 2000 or Windows 2003 Active Directory domain. 
+This simple guide is a mostly accurate way to set up a Samba machine as a domain member in a Windows 2000 or Windows 2003 Active Directory domain. For a REALLY short version, tested with Win2k3, see the Quick 'n' Dirty instructions at the bottom of the page
  
 The following setup is used: 
  192.168.0.1 test1.thinclient.test.org (the AD server, hereafter known as the server) 
  192.168.0.209 mail.thinclient.test.org (samba3 machine) 
@@ -64,11 +64,11 @@
  workgroup = THINCLIENT 
  netbios name = MAIL 
  
  # winbindd configuration 
- winbind separator = +  
- idmap uid = 10000-20000  
- idmap gid = 10000-20000 
+ winbind separator = + ''The default character is \ which is good if you use mod_ntlm since that's it's character, users only have to remember 1 syntax''  
+ idmap uid = 10000-20000 ''alias of winbind uid''  
+ idmap gid = 10000-20000 ''alias of winbind gid''  
  winbind enum users = yes 
  winbind enum groups = yes 
  template homedir = /home/%D/%U 
  template shell = /bin/bash 
@@ -83,8 +83,10 @@
  
 NB: The important things to pay attention to here are the name of our samba machine (netbios name), the workgroup, and the ActiveDirectory stuff. 
  
 ! Configure Kerberos5 
+  
+''Configuring your kerberos setup is much easier in the long run then generating the key and importing it''  
  
 See ActiveDirectoryKerberos on setting up Kerberos to talk to ActiveDirectory. 
  
 ''If your kerberos setup is good, at this point, you might just want to run'' __net ads join -U Administrator%password__ ''which should do all that _ktpass_ and _ktutil_ stuff on the fly as mentioned in [http://us1.samba.org/samba/docs/man/domain-member.html#ads-member] . Then you can skip to the winbind section below ;-)'' -- EnigMa 
@@ -106,9 +108,9 @@
  ktutil: __q__ 
  
 Alternatively ... as root: 
  
- net join -U Administrator%password 
+ net join -U Administrator%password ''Don't specify %password and it will prompt you on the command line, for the security minded''  
  
 This will join the Samba machine to the Active Directory Domain. 
 However this latter will only work if your Kerberos configuration actually works. 
  
@@ -203,12 +205,87 @@
  
 * Using Kerberos Clients section of the [ Microsoft : Step-by-Step Guide to Kerberos 5 (krb5 1.0) Interoperability | http://www.microsoft.com/windows2000/techinfo/planning/security/kerbsteps.asp ] 
 * [ Authentication to ADS | http://mailman.mit.edu/pipermail/kerberos/2002-June/001189.html ] 
 * The winbindd and Active Directory Domain Member sections of the [ Samba v3 Documentation | http://au1.samba.org/samba/devel/docs/html/Samba-HOWTO-Collection.html ] 
+  
+----  
+! Quick 'n' Dirty setup for Samba 3 and Windows 2003  
+  
+These are the absolute bare minimum steps to get your Samba server integrated as a member server in an AD controlled domain with Win2k3 as the DC.  
+  
+1. ENSURE your samba box has an A record and associated PTR in DNS.  
+  
+2. On your DC, disable signing: Run Domain Controller Policy tool and edit Account Policies -> Security Options -> Microsoft network client: Digitally sign communications (always) Set this to Disabled. Do the same in the Domain Policy tool. Note, you will need to reboot the server for this step, though it won't tell you to. Disable on your samba server as well with the following in smb.conf  
+  
+<verbatim>  
+ client signing = no  
+ client use spnego = no  
+</verbatim>  
+  
+3. On your samba server, install kerberos5, and edit /etc/krb5.conf. It should contain:  
+<verbatim>  
+[libdefaults]  
+ default_realm = YOUR.ADS.DOMAIN  
+ dns_lookup_kdc = false  
+ dns_lookup_realm = false  
+  
+[domain_realm]  
+ .your.domain.name=YOUR.ADS.DOMAIN  
+ your.domain.name=YOUR.ADS.DOMAIN  
+  
+[realms]  
+YOUR.ADS.DOMAIN = {  
+ default_domain = your.domain.name  
+ kdc = IP.OF.THE.DC  
+}  
+</verbatim>  
+  
+4. ensure smb.conf contains  
+<verbatim>  
+ realm = YOUR.ADS.DOMAIN  
+ workgroup = YOUR  
+ security = ADS  
+</verbatim>  
+  
+5. Get a ticket using kerberos: kinit administrator (enter the administrator password when prompted). The klist command should then list a ticket.  
+  
+6. Join the domain using 'net ads join'. This should use the credentials in your kerberos ticket.  
+  
+7. Set up winbind - ensure the following is in smb.conf  
+<verbatim>  
+ winbind uid = 10000-20000  
+ winbind gid = 10000-20000  
+ winbind enum groups = yes  
+ winbind enum users = yes  
+</verbatim>  
+  
+8. store your winbind credentials with wbinfo --set-auth-user=DOMAIN\\administrator%password  
+  
+9. modify /etc/pam.d/samba (on woody) or the appropriate pam file to add "sufficient" for auth and account using pam_winbind.so. These need to go BEFORE the pam_unix.so calls for samba. My /etc/pam.d/samba is as follows:  
+  
+<verbatim>  
+auth sufficient pam_winbind.so  
+auth required pam_unix.so nullok  
+account sufficient pam_winbind.so  
+account required pam_unix.so  
+session required pam_unix.so  
+password required pam_unix.so  
+</verbatim>  
+  
+10. Modify /etc/nsswitch.conf with the following:  
+<verbatim>  
+passwd: winbind compat  
+group: winbind compat  
+shadow: winbind compat  
+</verbatim>  
+  
+11. Restart samba and winbind.  
+  
+12. All should work. :) Browse your server and see...  
  
 ---- 
  
 ! Footnotes 
 [1] %Systemroot% is a variable set by Windows NT and onward to mean "the location where Windows is installed", ie c:\winnt, c:\windows, etc. 
  
 ----- 
 CategoryInteroperability