<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Linux-AD Integration, Version 4</title>
	<atom:link href="http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/</link>
	<description>The weblog of an IT pro specializing in virtualization, storage, and servers</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:13:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: killboy</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-50273</link>
		<dc:creator>killboy</dc:creator>
		<pubDate>Wed, 16 Feb 2011 02:10:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-50273</guid>
		<description>** &quot;Sorry - angle brackets must have been treated as html and got stripped&quot; 

Great article Scott .. just a minor update, you mentioned testing kerberos by running:

kinit AD_username@AD_domain_DNS_name

This will fail, going by the kerberos man page the command should be:

kinit AD_username@realm_name

Quoting:
&quot;
       When  writing a Kerberos name, the principal name is separated from the
       instance (if not null) by a slash, and the  realm  (if  not  the  local
       realm)  follows, preceded by an ‘‘@’’ sign.  The following are examples
       of valid Kerberos names:

               david
               jennifer/admin
               joeuser@BLEEP.COM
               cbrown/root@FUBAR.ORG
 &quot;

Most people won&#039;t notice as they&#039;ve set the default realm and can simply run:

kinit 


cheers</description>
		<content:encoded><![CDATA[<p>** &#8220;Sorry &#8211; angle brackets must have been treated as html and got stripped&#8221; </p>
<p>Great article Scott .. just a minor update, you mentioned testing kerberos by running:</p>
<p>kinit AD_username@AD_domain_DNS_name</p>
<p>This will fail, going by the kerberos man page the command should be:</p>
<p>kinit AD_username@realm_name</p>
<p>Quoting:<br />
&#8221;<br />
       When  writing a Kerberos name, the principal name is separated from the<br />
       instance (if not null) by a slash, and the  realm  (if  not  the  local<br />
       realm)  follows, preceded by an ‘‘@’’ sign.  The following are examples<br />
       of valid Kerberos names:</p>
<p>               david<br />
               jennifer/admin<br />
               <a href="mailto:joeuser@BLEEP.COM">joeuser@BLEEP.COM</a><br />
               cbrown/root@FUBAR.ORG<br />
 &#8221;</p>
<p>Most people won&#8217;t notice as they&#8217;ve set the default realm and can simply run:</p>
<p>kinit </p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erik</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-46162</link>
		<dc:creator>erik</dc:creator>
		<pubDate>Wed, 07 Oct 2009 20:58:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-46162</guid>
		<description>Well, I&#039;m 99% of the way there. :-)

Thanks to your great documentation, I&#039;ve been able to work through the vast majority of this process. The one last holdout is limiting access via AD group. From what I&#039;ve read, this *should* just work by setting the pam_groupdn and pam_member_attribute settings in ldap.conf. Well I&#039;ve tried every different permutation of these settings I can think of, and have had no luck. Hopefully someone here might be able to shed some light.

Here are some (sanitized) configs:
First, the easy one, nsswitch.conf:
http://pastebin.com/f24823ad6

Next, pam.d/system-auth:
http://pastebin.com/fe6f98df

ldap.conf:
http://pastebin.com/f3d94b4cc

Any ideas? Thanks!</description>
		<content:encoded><![CDATA[<p>Well, I&#8217;m 99% of the way there. <img src='http://blog.scottlowe.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Thanks to your great documentation, I&#8217;ve been able to work through the vast majority of this process. The one last holdout is limiting access via AD group. From what I&#8217;ve read, this *should* just work by setting the pam_groupdn and pam_member_attribute settings in ldap.conf. Well I&#8217;ve tried every different permutation of these settings I can think of, and have had no luck. Hopefully someone here might be able to shed some light.</p>
<p>Here are some (sanitized) configs:<br />
First, the easy one, nsswitch.conf:<br />
<a href="http://pastebin.com/f24823ad6" rel="nofollow">http://pastebin.com/f24823ad6</a></p>
<p>Next, pam.d/system-auth:<br />
<a href="http://pastebin.com/fe6f98df" rel="nofollow">http://pastebin.com/fe6f98df</a></p>
<p>ldap.conf:<br />
<a href="http://pastebin.com/f3d94b4cc" rel="nofollow">http://pastebin.com/f3d94b4cc</a></p>
<p>Any ideas? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan B. Lynch</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-46026</link>
		<dc:creator>Ryan B. Lynch</dc:creator>
		<pubDate>Sat, 26 Sep 2009 21:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-46026</guid>
		<description>Scott, I have found your AD articles to be enormously helpful, and I&#039;ve based my own Linux-AD integration efforts on the work you&#039;ve done.  I wanted to add some notes about two topics that you don&#039;t address, in case anyone else wants to pursue them:  Password changes from Linux hosts, and Kerberos-authenticated LDAP lookups.

I should note that I&#039;m working with an up-to-date version of Fedora 11 Linux (x86-64), so I may just have newer, better versions of some of the key components.  Red Hat/Centos users can probably build these updated packages from the Fedora or EPEL source RPMs, if those distros don&#039;t provide them.


PASSWORD CHANGING:

My initial test configurations followed your examples, and &#039;passwd&#039; didn&#039;t work for AD accounts, no surprise, there.  On a hunch, I ran &#039;netstat&#039; against my two DCs, and I noticed that one wasn&#039;t listening on port 749, at all.  Port 464 (TCP) was open on both, though.

I modified my &#039;/etc/krb5.con&#039; file, changing the &#039;admin_server&#039; line to &#039;admin_server = dcname.domain.com:464&#039; (note the port change, there).  For reference, here&#039;s the &#039;password&#039; section of my PAM &#039;system-auth&#039; file, too:

password    requisite     pam_cracklib.so try_first_pass retry=3
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password    sufficient    pam_krb5.so minimum_uid=9999
password    required     pam_deny.so

Using the configuration, above, password changes work flawlessly.  I even get the right error messages back when a new password doesn&#039;t meet the domain password complexity requirements.

(Also, I&#039;ll note that the &#039;kpasswd&#039; command works, too.  It doesn&#039;t integrate with PAM, at all, so it&#039;s a nice backup in case of pam_krb5 problems, and the password change process is basically identical--run &#039;kpasswd&#039;, input current password, and then input the new password twice.)


SASL (KRB4) AUTH FOR LDAP LOOKUPS:

I have some security concerns with using non-SSL simple LDAP binds for group/user name resolution.  Since nss_ldap has Kerb auth support (via SASL), I decided to make the switch.  (SSL support may be coming a little later, if I can coordinate the CA setup process with our Windows admins.)  The result isn&#039;t perfect, but I think it&#039;s a good start.

Basically, I&#039;ve replaced the domain-wide LDAP &quot;bind&quot; user account.  Now, each Linux machine now uses its own AD machine account (&#039;HOSTNAME$@DOMAIN.COM&#039;), the creds for which were added to our private, protected &#039;/etc/krb5.keytab&#039; file by the &#039;net ads join&#039; command.  (You should be able to confirm this by running &#039;klist -k&#039; as root.)

In my &#039;/etc/ldap.conf&#039; file, I removed all of these directives:

host 10.10.10.10
base dc=example,dc=com
uri ldap://server.example.com/
binddn ldap@example.com
bindpw adldapbindpw

with these directives, instead:

nss_srv_domain domain.com
bind_timelimit 5
timelimit 15
idle_timelimit 1800
bind_policy soft
nss_reconnect_tries 3
krb5_ccname FILE:/tmp/krb5cc_nss_ldap
use_sasl on
rootuse_sasl yes
sasl_authid HOSTNAME$
rootsasl_auth_id HOSTNAME$
sasl_secprops maxssf=0

This tells nss_ldap to look up the LDAP SRV records in the &#039;domain.com&#039; domain, and to connect to whatever LDAP service(s) it finds there, in the DNS.  nss_ldap will also look for Kerberos tickets in the cache file &#039;/tmp/krb5cc_nss_ldap&#039; (which will need to be created and made world-readable by another process) and to connect using any tickets for the principal &#039;HOSTNAME$&#039;.  (I&#039;ll leave it to others to look up what the rest of those directives do.)

To populate and manage that world-readable ticket cache, I made a script &#039;/etc/init.d/krb5_nss_ldap&#039; that can handle the &#039;kinit&#039; and &#039;kdestroy&#039; logic needed to create, refresh, and destroy the ticket cache.  It runs as a chkconfig service at boot time, with root privs, so it can access the keytab for the creds needed to obtain the TGT that it writes into the &#039;/tmp/&#039; cache.  I run that same script from a Cron job on an hourly basis, as well, to keep the cached TGT from expiring.

So the idea, here, is that any low-privilege process needing an LDAP lookup will try to use the system&#039;s own computer account tickets, which should be available in a cache that any low-privilege process can access.  But none of these low-privilege processes have access to the system keytab file &#039;/etc/krb5.keytab&#039;.

The security difference isn&#039;t huge, here:  A rogue process (say, an attacker with a local nonroot exploit) could still use the system TGT to muck around in AD and do some damage.  The real benefits are in the aftermath of an attack:

 - The machine account, itself, hasn&#039;t been comprised.  Once the attacker is kicked out, he can only use the stolen TGT until it expires (in less than 2 hours, if you used the same kinit parameters as me).

 - You don&#039;t have to replace compromised LDAP bind account creds on all your Linux machines.  (This is also kind of nice, beforehand--you can auto-generate all the &#039;ldap.conf&#039; parameters, locally, using a script that grabs the local host and domain names.)

I intend to change this, slightly, in production use.  I haven&#039;t fully considered the potential security risks in making the computer account creds available generally, but I suspect it&#039;s not really a secure practice.  I&#039;m planning to auto-generate a separate &#039;service&#039;-type principal for each machine, for LDAP usage, only.  But the rest of the process should be the same.

With SSL enabled, and incorporating my planned change, I wonder whether it&#039;s possible to secure things even further.  I believe the &#039;nscd&#039; daemon might be able to handle the entire LDAP bind-and-lookup process by itself, which would mean that no other accounts would need direct LDAP access--&#039;nscd&#039; would be a trusted intermediary.  But I don&#039;t know whether &#039;nscd&#039; can handle all of the needs of local processes, so it might be a little more complicated than that.</description>
		<content:encoded><![CDATA[<p>Scott, I have found your AD articles to be enormously helpful, and I&#8217;ve based my own Linux-AD integration efforts on the work you&#8217;ve done.  I wanted to add some notes about two topics that you don&#8217;t address, in case anyone else wants to pursue them:  Password changes from Linux hosts, and Kerberos-authenticated LDAP lookups.</p>
<p>I should note that I&#8217;m working with an up-to-date version of Fedora 11 Linux (x86-64), so I may just have newer, better versions of some of the key components.  Red Hat/Centos users can probably build these updated packages from the Fedora or EPEL source RPMs, if those distros don&#8217;t provide them.</p>
<p>PASSWORD CHANGING:</p>
<p>My initial test configurations followed your examples, and &#8216;passwd&#8217; didn&#8217;t work for AD accounts, no surprise, there.  On a hunch, I ran &#8216;netstat&#8217; against my two DCs, and I noticed that one wasn&#8217;t listening on port 749, at all.  Port 464 (TCP) was open on both, though.</p>
<p>I modified my &#8216;/etc/krb5.con&#8217; file, changing the &#8216;admin_server&#8217; line to &#8216;admin_server = dcname.domain.com:464&#8242; (note the port change, there).  For reference, here&#8217;s the &#8216;password&#8217; section of my PAM &#8216;system-auth&#8217; file, too:</p>
<p>password    requisite     pam_cracklib.so try_first_pass retry=3<br />
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok<br />
password    sufficient    pam_krb5.so minimum_uid=9999<br />
password    required     pam_deny.so</p>
<p>Using the configuration, above, password changes work flawlessly.  I even get the right error messages back when a new password doesn&#8217;t meet the domain password complexity requirements.</p>
<p>(Also, I&#8217;ll note that the &#8216;kpasswd&#8217; command works, too.  It doesn&#8217;t integrate with PAM, at all, so it&#8217;s a nice backup in case of pam_krb5 problems, and the password change process is basically identical&#8211;run &#8216;kpasswd&#8217;, input current password, and then input the new password twice.)</p>
<p>SASL (KRB4) AUTH FOR LDAP LOOKUPS:</p>
<p>I have some security concerns with using non-SSL simple LDAP binds for group/user name resolution.  Since nss_ldap has Kerb auth support (via SASL), I decided to make the switch.  (SSL support may be coming a little later, if I can coordinate the CA setup process with our Windows admins.)  The result isn&#8217;t perfect, but I think it&#8217;s a good start.</p>
<p>Basically, I&#8217;ve replaced the domain-wide LDAP &#8220;bind&#8221; user account.  Now, each Linux machine now uses its own AD machine account (&#8216;HOSTNAME$@DOMAIN.COM&#8217;), the creds for which were added to our private, protected &#8216;/etc/krb5.keytab&#8217; file by the &#8216;net ads join&#8217; command.  (You should be able to confirm this by running &#8216;klist -k&#8217; as root.)</p>
<p>In my &#8216;/etc/ldap.conf&#8217; file, I removed all of these directives:</p>
<p>host 10.10.10.10<br />
base dc=example,dc=com<br />
uri ldap://server.example.com/<br />
binddn <a href="mailto:ldap@example.com">ldap@example.com</a><br />
bindpw adldapbindpw</p>
<p>with these directives, instead:</p>
<p>nss_srv_domain domain.com<br />
bind_timelimit 5<br />
timelimit 15<br />
idle_timelimit 1800<br />
bind_policy soft<br />
nss_reconnect_tries 3<br />
krb5_ccname FILE:/tmp/krb5cc_nss_ldap<br />
use_sasl on<br />
rootuse_sasl yes<br />
sasl_authid HOSTNAME$<br />
rootsasl_auth_id HOSTNAME$<br />
sasl_secprops maxssf=0</p>
<p>This tells nss_ldap to look up the LDAP SRV records in the &#8216;domain.com&#8217; domain, and to connect to whatever LDAP service(s) it finds there, in the DNS.  nss_ldap will also look for Kerberos tickets in the cache file &#8216;/tmp/krb5cc_nss_ldap&#8217; (which will need to be created and made world-readable by another process) and to connect using any tickets for the principal &#8216;HOSTNAME$&#8217;.  (I&#8217;ll leave it to others to look up what the rest of those directives do.)</p>
<p>To populate and manage that world-readable ticket cache, I made a script &#8216;/etc/init.d/krb5_nss_ldap&#8217; that can handle the &#8216;kinit&#8217; and &#8216;kdestroy&#8217; logic needed to create, refresh, and destroy the ticket cache.  It runs as a chkconfig service at boot time, with root privs, so it can access the keytab for the creds needed to obtain the TGT that it writes into the &#8216;/tmp/&#8217; cache.  I run that same script from a Cron job on an hourly basis, as well, to keep the cached TGT from expiring.</p>
<p>So the idea, here, is that any low-privilege process needing an LDAP lookup will try to use the system&#8217;s own computer account tickets, which should be available in a cache that any low-privilege process can access.  But none of these low-privilege processes have access to the system keytab file &#8216;/etc/krb5.keytab&#8217;.</p>
<p>The security difference isn&#8217;t huge, here:  A rogue process (say, an attacker with a local nonroot exploit) could still use the system TGT to muck around in AD and do some damage.  The real benefits are in the aftermath of an attack:</p>
<p> &#8211; The machine account, itself, hasn&#8217;t been comprised.  Once the attacker is kicked out, he can only use the stolen TGT until it expires (in less than 2 hours, if you used the same kinit parameters as me).</p>
<p> &#8211; You don&#8217;t have to replace compromised LDAP bind account creds on all your Linux machines.  (This is also kind of nice, beforehand&#8211;you can auto-generate all the &#8216;ldap.conf&#8217; parameters, locally, using a script that grabs the local host and domain names.)</p>
<p>I intend to change this, slightly, in production use.  I haven&#8217;t fully considered the potential security risks in making the computer account creds available generally, but I suspect it&#8217;s not really a secure practice.  I&#8217;m planning to auto-generate a separate &#8216;service&#8217;-type principal for each machine, for LDAP usage, only.  But the rest of the process should be the same.</p>
<p>With SSL enabled, and incorporating my planned change, I wonder whether it&#8217;s possible to secure things even further.  I believe the &#8216;nscd&#8217; daemon might be able to handle the entire LDAP bind-and-lookup process by itself, which would mean that no other accounts would need direct LDAP access&#8211;&#8217;nscd&#8217; would be a trusted intermediary.  But I don&#8217;t know whether &#8216;nscd&#8217; can handle all of the needs of local processes, so it might be a little more complicated than that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-45371</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Wed, 05 Aug 2009 16:47:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-45371</guid>
		<description>Scott - you can ignore my post.  The authentication shows up under user &quot;System&quot;, which initially thew me off.

Now to get the password change to work.  I&#039;m sure the rejection is due to a policy somewhere.

Thanks!</description>
		<content:encoded><![CDATA[<p>Scott &#8211; you can ignore my post.  The authentication shows up under user &#8220;System&#8221;, which initially thew me off.</p>
<p>Now to get the password change to work.  I&#8217;m sure the rejection is due to a policy somewhere.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-45361</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Tue, 04 Aug 2009 20:52:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-45361</guid>
		<description>Scott,

I&#039;ve used your methodology to successfully implement LDAP authentication between Linux and Windows, using kerberos.  The industry that I work in has a lot of gov security requirements, one of which being every login to a windows box must be recorded in the event viewer.  I&#039;m using Win2k3 R2 SP2.  The only account that shows up in the security event viewer is the binder account.  How do I get the user account to show up in the Win2k3 security log as well?

Thanks,
Tim</description>
		<content:encoded><![CDATA[<p>Scott,</p>
<p>I&#8217;ve used your methodology to successfully implement LDAP authentication between Linux and Windows, using kerberos.  The industry that I work in has a lot of gov security requirements, one of which being every login to a windows box must be recorded in the event viewer.  I&#8217;m using Win2k3 R2 SP2.  The only account that shows up in the security event viewer is the binder account.  How do I get the user account to show up in the Win2k3 security log as well?</p>
<p>Thanks,<br />
Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: slowe</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-44351</link>
		<dc:creator>slowe</dc:creator>
		<pubDate>Thu, 30 Apr 2009 03:18:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-44351</guid>
		<description>Kathy,

Without knowing more about your installation and your specific configuration, there isn&#039;t a whole lot I can do to help.</description>
		<content:encoded><![CDATA[<p>Kathy,</p>
<p>Without knowing more about your installation and your specific configuration, there isn&#8217;t a whole lot I can do to help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kathy</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-44345</link>
		<dc:creator>kathy</dc:creator>
		<pubDate>Wed, 29 Apr 2009 18:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-44345</guid>
		<description>Hi 
I have server running Red Hat Enterprise Linux ES release 4 (Nahant Update 6). we have ldap configured on it, here is several problems that we have encountered  and i&#039;m wondering if anyone else has seen them:

1. doing  the following causes segmentation fault.
#getent -s &#039;dns ldap&#039; passwd
Segmentation fault

2. using sudo gets the followign error:
#sudo getent passwd
Password:
sudo: ../../../libraries/liblber/sockbuf.c:90: ber_sockbuf_ctrl: Assertion `sb != ((void *)0)&#039; failed.
Aborted


any comments is appreciated.

regards,
Kathy</description>
		<content:encoded><![CDATA[<p>Hi<br />
I have server running Red Hat Enterprise Linux ES release 4 (Nahant Update 6). we have ldap configured on it, here is several problems that we have encountered  and i&#8217;m wondering if anyone else has seen them:</p>
<p>1. doing  the following causes segmentation fault.<br />
#getent -s &#8216;dns ldap&#8217; passwd<br />
Segmentation fault</p>
<p>2. using sudo gets the followign error:<br />
#sudo getent passwd<br />
Password:<br />
sudo: ../../../libraries/liblber/sockbuf.c:90: ber_sockbuf_ctrl: Assertion `sb != ((void *)0)&#8217; failed.<br />
Aborted</p>
<p>any comments is appreciated.</p>
<p>regards,<br />
Kathy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-44210</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Sun, 12 Apr 2009 05:10:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-44210</guid>
		<description>@Munroe

I don&#039;t think you want/need nscd.
i&#039;m not sure about why it keeps reconnecting to the ldap server...</description>
		<content:encoded><![CDATA[<p>@Munroe</p>
<p>I don&#8217;t think you want/need nscd.<br />
i&#8217;m not sure about why it keeps reconnecting to the ldap server&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sleepy</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-43661</link>
		<dc:creator>Sleepy</dc:creator>
		<pubDate>Thu, 19 Feb 2009 03:12:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-43661</guid>
		<description>Scott,
Thanks so much for this guide! I have found it really really useful.
I thought I would add a tip that I worked out....
In our AD we have all our Linux user accounts in an OU which is in another OU. The time it took to to log in after entering a password was too long. Like 10-15 seconds. So, in /etc/ldap.conf I changed these lines like this:
nss_base_passwd ou=ou1,dc=test,dc=domain,dc=co,dc=uk?sub
nss_base_shadow ou=ou1,dc=test,dc=domain,dc=co,dc=uk?sub
nss_base_group ou=ou1,dc=test,dc=domain,dc=co,dc=uk?sub?&amp;(objectCategory=group)(gidnumber=*)
And this fixed it. Log in time after this was about 2 seconds. I did have &quot;pam_login_attribute sAMAccountName&quot; set too but it made no difference.
Cheers!</description>
		<content:encoded><![CDATA[<p>Scott,<br />
Thanks so much for this guide! I have found it really really useful.<br />
I thought I would add a tip that I worked out&#8230;.<br />
In our AD we have all our Linux user accounts in an OU which is in another OU. The time it took to to log in after entering a password was too long. Like 10-15 seconds. So, in /etc/ldap.conf I changed these lines like this:<br />
nss_base_passwd ou=ou1,dc=test,dc=domain,dc=co,dc=uk?sub<br />
nss_base_shadow ou=ou1,dc=test,dc=domain,dc=co,dc=uk?sub<br />
nss_base_group ou=ou1,dc=test,dc=domain,dc=co,dc=uk?sub?&amp;(objectCategory=group)(gidnumber=*)<br />
And this fixed it. Log in time after this was about 2 seconds. I did have &#8220;pam_login_attribute sAMAccountName&#8221; set too but it made no difference.<br />
Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Munroe</title>
		<link>http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/comment-page-4/#comment-41969</link>
		<dc:creator>Munroe</dc:creator>
		<pubDate>Thu, 16 Oct 2008 06:44:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scottlowe.org/?p=400#comment-41969</guid>
		<description>Great article.  I have been successful binding a Debian Lenny Box to AD w2k3 R2.  However for some reason performance is less than stellar.  We are using this box as a mail server. and my auth.log is riddled with:

Oct 16 02:24:38 krypton imaplogin: nss_ldap: reconnected to LDAP server ldap://192.168.90.254 after 1 attempt
Oct 16 02:25:37 krypton imaplogin: nss_ldap: could not connect to any LDAP server as cn=binder,ou=test,dc=ad,dc=harmony,dc=lan - Can&#039;t contact LDAP server
Oct 16 02:25:37 krypton imaplogin: nss_ldap: failed to bind to LDAP server ldap://=: Can&#039;t contact LDAP server
Oct 16 02:25:37 krypton imaplogin: nss_ldap: reconnected to LDAP server ldap://192.168.90.254
Oct 16 02:25:37 krypton imaplogin: nss_ldap: reconnecting to LDAP server...
Oct 16 02:25:38 krypton imaplogin: nss_ldap: reconnected to LDAP server ldap://192.168.90.254 after 1 attempt
Oct 16 02:25:38 krypton imaplogin: nss_ldap: reconnecting to LDAP server...
Oct 16 02:25:38 krypton imaplogin: nss_ldap: reconnected to LDAP server ldap://192.168.90.254 after 1 attempt


I have found that nscd is also causing lots of performance problems.  I&#039;m wondering if anyone else has these issues?</description>
		<content:encoded><![CDATA[<p>Great article.  I have been successful binding a Debian Lenny Box to AD w2k3 R2.  However for some reason performance is less than stellar.  We are using this box as a mail server. and my auth.log is riddled with:</p>
<p>Oct 16 02:24:38 krypton imaplogin: nss_ldap: reconnected to LDAP server ldap://192.168.90.254 after 1 attempt<br />
Oct 16 02:25:37 krypton imaplogin: nss_ldap: could not connect to any LDAP server as cn=binder,ou=test,dc=ad,dc=harmony,dc=lan &#8211; Can&#8217;t contact LDAP server<br />
Oct 16 02:25:37 krypton imaplogin: nss_ldap: failed to bind to LDAP server ldap://=: Can&#8217;t contact LDAP server<br />
Oct 16 02:25:37 krypton imaplogin: nss_ldap: reconnected to LDAP server ldap://192.168.90.254<br />
Oct 16 02:25:37 krypton imaplogin: nss_ldap: reconnecting to LDAP server&#8230;<br />
Oct 16 02:25:38 krypton imaplogin: nss_ldap: reconnected to LDAP server ldap://192.168.90.254 after 1 attempt<br />
Oct 16 02:25:38 krypton imaplogin: nss_ldap: reconnecting to LDAP server&#8230;<br />
Oct 16 02:25:38 krypton imaplogin: nss_ldap: reconnected to LDAP server ldap://192.168.90.254 after 1 attempt</p>
<p>I have found that nscd is also causing lots of performance problems.  I&#8217;m wondering if anyone else has these issues?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

