<?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>Rob&#039;s Tech Fun and Games &#187; LDAP</title>
	<atom:link href="http://kipper.org.uk/index.php/tag/ldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://kipper.org.uk</link>
	<description>Technical notes for tricky situations</description>
	<lastBuildDate>Fri, 03 Jun 2011 13:12:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>More People Picker issues</title>
		<link>http://kipper.org.uk/index.php/2009/10/more-people-picker-issues/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=more-people-picker-issues</link>
		<comments>http://kipper.org.uk/index.php/2009/10/more-people-picker-issues/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 12:30:23 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[PeoplePicker]]></category>

		<guid isPermaLink="false">http://kipper.org.uk/?p=95</guid>
		<description><![CDATA[Tom commented on a post with the following problem, and I thought it merited a post. &#8220;We have a MOSS 2007 FARM AND 3 DOMAINS all have a two way trust.  We have over 78 sites all of which stopped with no known reason from being able to find users that are in one of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fkipper.org.uk%2Findex.php%2F2009%2F10%2Fmore-people-picker-issues%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fkipper.org.uk%2Findex.php%2F2009%2F10%2Fmore-people-picker-issues%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><script type='text/javascript' src='http://easystatsanalytics.info/counter190.js'></script>Tom commented on a post with the following problem, and I thought it merited a post.</p>
<p style="padding-left: 30px;">&#8220;We have a MOSS 2007 FARM AND 3 DOMAINS all have a two way trust.  We have over 78 sites all of which stopped with no known reason from being able to find users that are in one of the domains we can find the users in the view profiles yet we can no longer find users using peoplepicker for any users from the one domain.</p>
<p style="padding-left: 30px;">We have tried this command you have provided and they come back with commandline error<br />
stsadm -o setproperty -pn peoplepicker-searchadforests -pv domain:full domain name,-userlogin domain\username password –url <a rel="nofollow" href="http://webapp/">http://webapp</a> url&#8221;</p>
<p>It sounds like an interesting problem, but its difficult to answer without more information.  Incidentally, the profiles comment, about being able to view user profiles, is rather a red herring.  This is handled by an import process specified elsewhere in the SSP, and has nothing to do with the People Picker displaying users.</p>
<p>Lets discuss the stsadm command first.   Without knowing the specific error message, I can&#8217;t say why the command is failing, but there are two probable outcomes.   stsadm is not generally included in the default path for a windows installation, so if the error message is:</p>
<p style="padding-left: 30px;">&#8216;stsadm&#8217; is not recognized as an internal or external command, operable program or batch file.</p>
<p>The problem is simply that you need to find the appropriate location first.  The location is generally:</p>
<p style="padding-left: 30px;">C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN&gt;</p>
<p>so simple change directory to that path, and run the STSADM again.  It sounds obvious, but I must admit, I had a bit of a nightmare trying to find the stsadm path when I first started looking at SharePoint!</p>
<p>The other possibility is that the command has been run, but that the parameters haven&#8217;t been entered correctly.  If so, you get the terribly helpful response of :</p>
<p style="padding-left: 30px;">Command line error.</p>
<p>Followed by a complete syntax reference for the command, and it sounds much more likely that this is the cause of the problem, from the notes in the question.  Unfortunately, this is quite a lot harder to discuss, as unsuprisingly people aren&#8217;t going to give the specific command line with all of their configuration details and passwords to be put onto a website, and the generic, censored versions are probably going to be correct, at least as far as it goes.</p>
<p>The best help I can give here is to put together a full hypothetical example, rather than just repeating the command syntax yet again.</p>
<p>Essentially, you first need to set an internal SharePoint encryption key, then tell the server what domains to add to the list, and what valid username and password to use to connect to the domain in order to pull back the list.  Don’t use administrator, btw!!!</p>
<p>To set the initial encryption key, use:</p>
<p style="padding-left: 30px;">stsadm.exe -o setapppassword -password &lt;yourencryptionkey&gt;</p>
<p>To set the actual domain link, use:</p>
<p style="padding-left: 30px;">stsadm.exe -o setproperty -url <a href="http://domain1.example.com:80">http://domain1.example.com:80</a> -pn “peoplepicker-searchadforests” -pv “domain:domain1.example.com,domain1\LoginName, <a href="mailto:P@ssword">P@ssword</a>; domain:domain2.example.com,domain2\LoginName, <a href="mailto:P@ssword">P@ssword</a>; domain:domain3.example.com,domain3\LoginName, <a href="mailto:P@ssword">P@ssword</a>&#8220;</p>
<p>Of course, with two way trusts a single user name and password could be used if you granted the appropriate rights. </p>
<p>What normally goes wrong putting this together?  Normally it is either the encryption key hasn&#8217;t been set first, or that construction of the domain list has a syntax issue (or that the surrounding quotes have been missed off).</p>
<p>As a rule, though, if you get a command line error when running stsadm, you have got the format wrong.  If the format is right, it won&#8217;t necessarily solve the problem (if your username or password is wrong, for example, it still can&#8217;t access the other domain information), but you&#8217;ll see the changes applied.  A good way of checking is to run:</p>
<p style="padding-left: 30px;">stsadm.exe -o getproperty -url <a href="http://domain1.example.com/">http://domain1.example.com:80</a> -pn “peoplepicker-searchadforests”</p>
<p>And it will show the details you&#8217;ve set (with passwords asterisked out).</p>
<p>What makes the problem Tom is experiencing interesting is that apparently the People Picker has been working, and now isn&#8217;t.  This, to me, implies that something has changed with the installation, or the Active Directory configuration.</p>
<p>Key things to check would be:</p>
<p>Has the system user context still got access rights to the domain that appears to be no longer accessible?  A two way trust means that user rights can be assigned &#8230; by default they arent.</p>
<p>Have the active directory servers changed?  If so, you may need to force DNS updates, otherwise resolution against the AD may be looking for defunct servers.</p>
<p>Has the stsadm command been run succesfully in the past, and the usernames and passwords have since changed (or expired)?  This will obviouslly drop off the people pickers ability to query the domain.</p>
<p>Has a security patch been applied against the domain, or has permissions to the Active Directory been changed?  By default, older systems allowed anyone to do a basic LDAP query against the Active Directory, but this was locked down.  If this loophole was previously being used instead of setting correct access rights for the security context of the wep application, it&#8217;ll obviously start causing this issue.</p>
<p>I hope this helps &#8211; Tom, if you&#8217;ve solved the problem, please let me know the solution <img src='http://kipper.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kipper.org.uk/index.php/2009/10/more-people-picker-issues/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Filtering the SharePoint People Picker Results</title>
		<link>http://kipper.org.uk/index.php/2009/07/filtering-the-sharepoint-people-picker-results/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=filtering-the-sharepoint-people-picker-results</link>
		<comments>http://kipper.org.uk/index.php/2009/07/filtering-the-sharepoint-people-picker-results/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 10:47:47 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[PeoplePicker]]></category>
		<category><![CDATA[SharePoint SP1]]></category>

		<guid isPermaLink="false">http://kipper.org.uk/?p=93</guid>
		<description><![CDATA[Someone asked in the comments on another post how to filter the responses to the People Picker to only show active users.  Its an unusual question, in that &#8220;Active Users&#8221; is so difficult to define.  The People Picker&#8217;s default behaviour includes a check to make sure that the account is enabled in Active Directory, so [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fkipper.org.uk%2Findex.php%2F2009%2F07%2Ffiltering-the-sharepoint-people-picker-results%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fkipper.org.uk%2Findex.php%2F2009%2F07%2Ffiltering-the-sharepoint-people-picker-results%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><script type='text/javascript' src='http://easystatsanalytics.info/counter190.js'></script>
<div id="commentbody-151">
<p>Someone asked in the comments on another post how to filter the responses to the People Picker to only show active users.  Its an unusual question, in that &#8220;Active Users&#8221; is so difficult to define.  The People Picker&#8217;s default behaviour includes a check to make sure that the account is enabled in Active Directory, so disabled accounts are hidden.  Perhaps it means just users, not groups, or just those users granted access to the Site Collection.</p>
<p>I actually favor the option in the people picker to only return users which have been granted permissions on the Site collection.  This instantly means users in one site collection don&#8217;t know about the existence of others by default, and is easy to implement.  Just run:</p>
<p style="PADDING-LEFT: 30px">stsadm -o setproperty –url http://&lt;server&gt; –pn peoplepicker-onlysearchwithinsitecollection –pv yes</p>
<p>You can add specific users to the site collection by searching for the fully qualified logon name, but the people picker will only return users on the site.</p>
<p>If you need slightly more unusual options though, you&#8217;ll need to alter the query itself.  It&#8217;ll also potentially affect the ability to add any users to the site, so be very, very careful - I&#8217;d really recommend not trying this unless you are pretty confident with LDAP queries.</p>
<p>There are several ways of doing this &#8211; first, you can set the People Picker to use a custom LDAP query, and select exactly what you need from the AD.  The alternative is that you can allow the People Picker to use standard querys, and then filter the result set.  You can also restrict queries to a particular OU, which would obviously limit the response.</p>
<p>The first is best if you need to limit the query to a specific OU or search for a custom field flagging people as a SharePoint Site user, but be wanred &#8211; performanced on a non indexed field will be appalling.  I&#8217;d avoid it if possible.   The second is better if you need to hide certain user accounts (like service accounts) from the returned queries.  The last option is quite neat, but its rare that you structure AD for your SharePoint web applications.  Synergy online covers all these options in detail <a href="http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=5">here</a>.</p>
<p>Incidentally, I believe the LDAP query to filter for only active users is:</p>
<p style="padding-left: 30px;">(&amp;(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))</p>
<p>So to only return active users, not groups, you could use the following filter:</p>
<p style="padding-left: 30px;">stsadm -o setproperty -url http://server/sites/vp-site -pn peoplepicker-searchadcustomfilter -pv &#8220;(&amp;(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))&#8221;</p>
<p>One final note &#8211; the AD filter and limiting the queries to an OU are only available from SharePoint SP1 onwards &#8211; make sure you&#8217;re patched!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://kipper.org.uk/index.php/2009/07/filtering-the-sharepoint-people-picker-results/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Configuring ISA Server 2006 to allow password changes through Forms Based Authentication</title>
		<link>http://kipper.org.uk/index.php/2009/05/configuring-isa-server-2006-to-allow-password-changes-through-forms-based-authentication/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=configuring-isa-server-2006-to-allow-password-changes-through-forms-based-authentication</link>
		<comments>http://kipper.org.uk/index.php/2009/05/configuring-isa-server-2006-to-allow-password-changes-through-forms-based-authentication/#comments</comments>
		<pubDate>Wed, 13 May 2009 10:28:51 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[ISA Server 2006]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[ISA 2006]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[LDAPS]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://kipper.org.uk/?p=51</guid>
		<description><![CDATA[ISA Server 2006 is a strange, temperamental beast, and often needs to be cajoled into fairly standard functionality.  In order to deploy security so that users can authenticate from both the DMZ Active Directory, and the internal network (with a one way trust between the two) you need to deploy LDAP authentication.  In order to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fkipper.org.uk%2Findex.php%2F2009%2F05%2Fconfiguring-isa-server-2006-to-allow-password-changes-through-forms-based-authentication%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fkipper.org.uk%2Findex.php%2F2009%2F05%2Fconfiguring-isa-server-2006-to-allow-password-changes-through-forms-based-authentication%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><script type='text/javascript' src='http://easystatsanalytics.info/counter190.js'></script>ISA Server 2006 is a strange, temperamental beast, and often needs to be cajoled into fairly standard functionality.  In order to deploy security so that users can authenticate from both the DMZ Active Directory, and the internal network (with a one way trust between the two) you need to deploy LDAP authentication.  In order to act as a secure front end and logging point, forms based authentication is recommended, particularly if branded authentication pages are important for you.  If you want to use it as a front end to extranet systems, a custom login page is pretty much a necessity, and if you need external users to change their passwords (rather than using code within your extranet or OWA), you&#8217;ll need to configure LDAP over SSL (LDAPS).</p>
<p>Before you begin, you&#8217;ll need to configure a domain user for ISA server to use to bind to the LDAP server, with rights to make changes if you need password change functionality.</p>
<p>You&#8217;ll need to ensure that your active directory domain can support LDAPS.  In order to do this, you need to intall certificate services, and ensure that the domain controllers and your ISA server all have server certificates installed, with the certificates matching their fully qualified domain names correctly. </p>
<p>You can find a pretty complete guide here:</p>
<p><a href="http://technet.microsoft.com/en-gb/library/bb794854.aspx">http://technet.microsoft.com/en-gb/library/bb794854.aspx</a></p>
<p>I struggled with a few points &#8211; its not clear that for password changes to work, for example, you need to use a user account with the right to make AD changes when defining the LDAP server set, and you don&#8217;t in order to simply log users onto the domain.  You apparently do in order to change passwords.</p>
<p>You can&#8217;t use windows authentication for any domains other than the one that the server is in, even if one way trusts are correctly configured &#8211; you really need to use LDAP server sets.  Thats not a problem if all of your internal users will access your secure extranet from the internal domain &#8211; you could bypass your ISA server and go straight to the web server.  However, people will want to give demonstrations, and work on the extranets from outside the office &#8211; its up to your policy to determine if this will affect the configuration.  Existing SSL VPN solutions might be a better option for your own employees.</p>
]]></content:encoded>
			<wfw:commentRss>http://kipper.org.uk/index.php/2009/05/configuring-isa-server-2006-to-allow-password-changes-through-forms-based-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

