<?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>Personal website of Dave Hope &#187; Active Directory</title>
	<atom:link href="http://davehope.co.uk/Blog/tag/active-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://davehope.co.uk</link>
	<description>Open source projects, sysadmin stuff and general geekage</description>
	<lastBuildDate>Tue, 18 May 2010 11:46:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Deleting the TFS workspace for a missing account fails (TF50605)</title>
		<link>http://davehope.co.uk/Blog/deleting-the-tfs-workspace-for-a-missing-account-fails-tf50605/</link>
		<comments>http://davehope.co.uk/Blog/deleting-the-tfs-workspace-for-a-missing-account-fails-tf50605/#comments</comments>
		<pubDate>Thu, 13 May 2010 14:24:40 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Team Foundation Server]]></category>

		<guid isPermaLink="false">http://davehope.co.uk/?p=557</guid>
		<description><![CDATA[Having decommissioned a few legacy AD DS domains over the last year or so we&#8217;ve had a few references in TFS to missing accounts. When attempting to delete the workspace you get the following error: TF50605: There was an error looking up the SID for OLD-DOMAIN\CCNETNIGHTLYBUILD. In order to delete the workspace, we need to [...]]]></description>
			<content:encoded><![CDATA[<p>Having decommissioned a few legacy AD DS domains over the last year or so we&#8217;ve had a few references in TFS to missing accounts. When attempting to delete the workspace you get the following error:</p>
<pre>TF50605: There was an error looking up the SID for OLD-DOMAIN\CCNETNIGHTLYBUILD.</pre>
<p>In order to delete the workspace, we need to remap it to a valid user account. Here&#8217;s the process to do just that.</p>
<p>Firstly, we should list the workspaces on this computer we&#8217;re having problems with (in this case, BUILDSERVER01).</p>
<pre>C:\&gt;tf workspaces /owner:* /server:http://tfs-server:8080 | findstr BUILDSERVER01
Workspace		Owner				Computer	Comment
----------------------- ------------------------------- --------------- -------------------------------
BUILDSERVER01		saCCNetNightly			BUILDSERVER01	Temporary CruiseControl.NET Wo
BUILDSERVER01		OLD-DOMAIN\CCNETNIGHTLYBUILD	BUILDSERVER01 	Temporary CruiseControl.NET Wo
BUILDSERVER01		saCCNetNightly			BUILDSERVER01
</pre>
<p>We may as well attempt to delete the workspace, though the process is likely to fail as it wont be able to resolve the SID if the domain is no longer available.</p>
<pre>C:\&gt;tf workspace /delete /server:http://tfs-server:8080 BUILDSERVER01;OLD-DOMAIN\CCNETNIGHTLYBUILD
<span style="color: red;">TF50605: There was an error looking up the SID for OLD-DOMAI\CCNETNIGHTLYBUILD.</span></pre>
<p>At this point, we need to open up the <em>TfsVersionControl </em>table and manually point the workspaces to a valid identity. The first stage is to identify the ID of the missing account:</p>
<pre>SELECT IdentityId FROM tfsVersionControl.tbl_Identity WHERE (DisplayName LIKE 'OLD-DOMAIN\CCNETNIGHTLYBUILD')</pre>
<p>Now that we have the ID, we can locate the workspaces the owner has on the server we&#8217;re having problems with.</p>
<pre>SELECT WorkspaceId, OwnerId, WorkspaceName FROM tfsVersionControl.tbl_Workspace WHERE (OwnerId = 311) AND (Computer = 'BUILDSERVER01')</pre>
<p>We should now update the <em>tfsVersionControl.tbl_Workspace</em> table with a valid IdentityId from the <em>tfsVersionControl.tbl_Identity</em> table. Once that&#8217;s done, try the delete command again:</p>
<pre>C:\&gt;tf workspace /delete /server:http://tfs-server:8080 "BUILDSERVER01;Dave Hope"
A deleted workspace cannot be recovered.
Workspace 'BUILDSERVER01;Dave Hope' on server 'http://tfs-server:8080' has 0 pending change(s).
Are you sure you want to delete the workspace? (Yes/No) Yes</pre>
<p>And hey presto, the workspace is gone.</p>
]]></content:encoded>
			<wfw:commentRss>http://davehope.co.uk/Blog/deleting-the-tfs-workspace-for-a-missing-account-fails-tf50605/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Join Ubuntu to Active Directory</title>
		<link>http://davehope.co.uk/Blog/join-ubuntu-to-active-directory/</link>
		<comments>http://davehope.co.uk/Blog/join-ubuntu-to-active-directory/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 12:09:01 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://davehope.co.uk/?p=517</guid>
		<description><![CDATA[Having recently deployed a handful of Ubuntu Linux systems for proxies and other roles I wanted to join them to Active Directory for Single Signon. Nobody wants to remember lots of different passwords, lets face it. I came across a product called Likewise, the free open-source version is available in the standard Ubuntu repositories. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Having recently deployed a handful of Ubuntu Linux systems for proxies and other roles I wanted to join them to Active Directory for Single Signon. Nobody wants to remember lots of different passwords, lets face it.</p>
<p>I came across a product called <a href="http://www.likewise.com/">Likewise</a>, the free open-source version is available in the standard Ubuntu repositories. Here&#8217;s a quick guide for how to get up and running with likewise-open.</p>
<p>Firstly, install Likewise.</p>
<pre>$ sudo aptitude install likewise-open</pre>
<p>The final part of the installation will prompt you for some information about your Active Directory domain. If you need to change the settings you enter here run <em>dpkg-reconfigure krb5-config</em>.</p>
<p><a href="http://davehope.co.uk/wp-content/uploads/2010/02/Likewise-Servers.png"><img width="550" height="357" class="aligncenter" title="Likewise-Servers" src="/wp-content/uploads/2010/02/Likewise-Servers-m.png" alt="Likewise Active Directory Domain Controllers" /></a></p>
<p>The second screen asks you for an administrative domain controler where password changes will occur.</p>
<p><a href="http://davehope.co.uk/wp-content/uploads/2010/02/Likewise-Administrative.png"><img width="550" height="356" class="aligncenter" title="Likewise-Administrative" src="/wp-content/uploads/2010/02/Likewise-Administrative-m.png" alt="Administrative server for Likewise" /></a></p>
<p>With the installation complete we now need to join the system to the Active Directory domain, this is accomplished with one simple command.</p>
<pre>$ sudo domainjoin-cli join NWTRADERS.MSFT Administrator</pre>
<p><a href="http://davehope.co.uk/wp-content/uploads/2010/02/Likewise-DomainJoin.png"><img width="550" height="357" src="/wp-content/uploads/2010/02/Likewise-DomainJoin-m.png" alt="Likewise Domain Join" title="Likewise-DomainJoin" class="aligncenter" /></a></p>
<p>I then wanted domain admins to be able to use sudo. This can easily be achieved by adding the following to the end of the <em>/etc/sudoers</em> file.</p>
<pre>%NWTRADERS\\domain^admins ALL=(ALL) ALL</pre>
]]></content:encoded>
			<wfw:commentRss>http://davehope.co.uk/Blog/join-ubuntu-to-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing a child domain that no longer exists</title>
		<link>http://davehope.co.uk/Blog/removing-a-child-domain-that-no-longer-exists/</link>
		<comments>http://davehope.co.uk/Blog/removing-a-child-domain-that-no-longer-exists/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 19:00:11 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Active Directory]]></category>

		<guid isPermaLink="false">http://davehope.co.uk/?p=141</guid>
		<description><![CDATA[I was asked to remove a child domain at work today. Usually that wouldn&#8217;t be a problem but unfortunately the final DC had been wiped and not been dcpromo&#8217;d (Cleanly removed from the domain). So I thought I&#8217;d document the process should anyone else find themselves in a similar situation. To do most of the [...]]]></description>
			<content:encoded><![CDATA[<p>I was asked to remove a child domain at work today. Usually that wouldn&#8217;t be a problem but unfortunately the final DC had been wiped and not been dcpromo&#8217;d (Cleanly removed from the domain).</p>
<p>So I thought I&#8217;d document the process should anyone else find themselves in a similar situation. To do most of the below, you&#8217;ll need to be an Enterprise Admin.</p>
<ol>
<li>Remove all the DNS entries for the missing DCs and the child domain. Make sure you get the GUID entries too.</li>
<li>Fire up ntdsutil and follow the below steps. When you select a server to connect to, connect to the operation master.<br />
<code>ntdsutil: <strong>metadata cleanup</strong><br />
metadata cleanup:<br />
metadata cleanup: <strong>connections</strong><br />
server connections:<br />
server connections: <strong>connect to server london.nwtraders.msft</strong><br />
Binding to london ...<br />
Connected to london using credentials of locally logged on user<br />
server connections:<br />
server connections: <strong>quit</strong><br />
metadata cleanup:<br />
metadata cleanup: <strong>select operation target</strong><br />
select operation target:<br />
select operation target: <strong>list domains</strong><br />
Found 2 domain(s)<br />
0 - DC=nwtraders,DC=msft<br />
1 - DC=child,DC=nwtraders,DC=msft<br />
select operation target:<br />
select operation target: <strong>select domain 1</strong><br />
No current site<br />
Domain - DC=child,DC=nwtraders,DC=msft<br />
No current server<br />
No current Naming Context<br />
select operation target:<br />
select operation target: <strong>quit</strong><br />
metadata cleanup:<br />
metadata cleanup: <strong>remove selected domain</strong><br />
</code></p>
<p>Depending on the exact situation, you may get an error about needing to remove a server first (Sorry, I can&#8217;t recall the exact error). If you do, there&#8217;s an extra step you need to undertake first.</p>
<p><code>ntdsutil: <strong>metadata cleanup</strong><br />
metadata cleanup:<br />
metadata cleanup: <strong>connections</strong><br />
server connections:<br />
server connections: <strong>connect to server london.nwtraders.msft</strong><br />
Binding to london ...<br />
Connected to london using credentials of locally logged on user<br />
server connections:<br />
server connections: <strong>quit</strong><br />
metadata cleanup:<br />
metadata cleanup: <strong>select operation target</strong><br />
select operation target:<br />
select operation target: <strong>list sites</strong><br />
Found 1 site(s)<br />
0 - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nwtraders,DC=msft<br />
select operation target:<br />
select operation target: <strong>select site </strong><br />
Site - CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nwtraders,DC=msft<br />
No current domain<br />
No current server<br />
No current Naming Context<br />
select operation target:<br />
select operation target: <strong>list servers in site</strong><br />
Found 1 server(s)<br />
0 - CN=brisbane,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=nwtraders,DC=msft<br />
select operation target: <strong>select server 0</strong><br />
</code><br />
Then repeat the first process to remove the server (remove selected server).</li>
<li>Open up Active Directory Sites And Services and remove any stranded servers.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://davehope.co.uk/Blog/removing-a-child-domain-that-no-longer-exists/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
