<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Unified Diff &#187; Samba</title>
	<atom:link href="http://www.unifieddiff.com/category/samba/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unifieddiff.com</link>
	<description>I should do that! How hard could it be?!</description>
	<lastBuildDate>Sat, 30 Jan 2010 01:23:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HOW TO: Samba as an AD Domain Member</title>
		<link>http://www.unifieddiff.com/2006/10/04/samba-ad-domain-member/</link>
		<comments>http://www.unifieddiff.com/2006/10/04/samba-ad-domain-member/#comments</comments>
		<pubDate>Thu, 05 Oct 2006 01:30:55 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://www.robertjcarroll.com/2006/10/05/samba-ad-domain-member/</guid>
		<description><![CDATA[There are probably a million and one articles about how to make Samba 3 an Active Directory domain member. But with all of that, this process still seems to require hours of research. So I&#8217;ve decided to compile my latest experiences here.
The domain member box is running Gentoo Linux. So you may need to adjust [...]]]></description>
			<content:encoded><![CDATA[<p>There are probably a million and one articles about how to make Samba 3 an Active Directory domain member. But with all of that, this process still seems to require hours of research. So I&#8217;ve decided to compile my latest experiences here.</p>
<p>The domain member box is running Gentoo Linux. So you may need to adjust the steps to fit your flavor. Make sure the USE flags kerberos, ldap, samba, ssl, and winbind are set. Start by installing an NTP client.
<pre># emerge ntp</pre></p>
<span id="more-24"></span>
<p>The purpose of NTP is to keep your computer&#8217;s clock in-sync with the domain controller. Edit your /etc/ntp.conf file to use your domain controller as the time server. Then sync your clock, start the NTP client, and install Samba:</p>
<pre>
# ntpdate ad01.rit.edu
# /etc/init.d/ntpd start
# rc-update add ntpd default
# emerge samba
</pre>
<p>Now you can configure kerberos. Open your /etc/krb5.conf file and make it look like this:</p>
<pre>
[libdefaults]
  ticket_lifetime = 600
  default_realm = RIT.EDU
  clockskew = 120

[realms]
  RIT.EDU = {
    kdc = ad01.rit.edu
    default_domain = RIT.EDU
  }

[domain_realm]
  .rit.edu = RIT.EDU
  rit.edu = RIT.EDU
</pre>
<p>Test your kerberos setup by requesting a ticket from your domain controller.</p>
<pre>
# kinit administrator
# klist
# kdestroy</pre>
<p>Edit your Samba configuration.</p>
<pre>
[global]
  workgroup = RIT
  realm = RIT.EDU
  server string =

  log file = /var/log/samba/log.%m
  max log size = 50

  hosts allow = 127.0.0.1 129.21.0.0/16   
  hosts deny = 0.0.0.0/0
  security = ADS
  allow trusted domains = yes
  password server = ad01.rit.edu
  encrypt passwords = yes
  min protocol = NT1

  winbind enum users = yes
  winbind enum groups = yes
  winbind cache time = 600
  winbind use default domain = yes
  template homedir = /home/%U
  obey pam restrictions = yes
  template shell = /bin/bash

  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  domain master = no
  local master = no

  idmap uid = 10000-99999
  idmap gid = 10000-99999
</pre>
<p>Add winbind to the daemon_list variable in /etc/conf.d/samba.</p>
<pre>daemon_list="smbd nmbd <strong>winbind</strong>"</pre>
<p>Join the domain and start Samba.</p>
<pre>
# net ads join -U administrator
# /etc/init.d/samba start
</pre>
<p>Add winbind to the passwd and group lines in /etc/nsswitch.conf.</p>
<pre>
passwd:      compat <strong>winbind</strong>
shadow:      compat
group:       compat <strong>winbind</strong>
</pre>
<p>Test user resolution and add Samba to the startup:</p>
<pre>
# getent passwd administrator
# rc-update add samba default
</pre>
<p>Add the bolded lines to your /etc/pam.d/system-auth file.</p>
<pre>
auth required pam_env.so
<strong>auth sufficient	pam_winbind.so</strong>
auth sufficient	pam_unix.so likeauth nullok <strong>use_first_pass</strong>
auth required pam_deny.so

account	required pam_access.so
<strong>account	sufficient pam_winbind.so</strong>
account	required pam_unix.so

password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
password sufficient pam_unix.so nullok md5 shadow use_authtok
password required pam_deny.so

session	required pam_limits.so
session	required pam_unix.so
<strong>session required pam_mkhomedir.so</strong>
</pre>
<p>That&#8217;s it! Now all you need to do is start samba and your box is an AD domain member.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unifieddiff.com/2006/10/04/samba-ad-domain-member/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
