<?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>Reliably Broken &#187; active directory</title>
	<atom:link href="http://reliablybroken.com/b/tag/active-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://reliablybroken.com/b</link>
	<description>It&#039;s a blog: let&#039;s do funch!</description>
	<lastBuildDate>Sat, 04 Sep 2010 21:22:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Network users and Mac 10.5 archive and install</title>
		<link>http://reliablybroken.com/b/2009/11/network-users-and-mac-10-5-archive-and-install/</link>
		<comments>http://reliablybroken.com/b/2009/11/network-users-and-mac-10-5-archive-and-install/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 18:25:07 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[gotchas]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://reliablybroken.com/b/?p=313</guid>
		<description><![CDATA[When upgrading a Mac from Mac OS X 10.4 (Tiger) to 10.5 (Leopard), remember that network accounts are not included if you do an archive and install and choose to migrate existing users. If a network account had its home folder at /Users/jbloggs then it will have been moved to /Previous Systems.localized/2009-11-06_0346/Users/jbloggs (although the date [...]]]></description>
			<content:encoded><![CDATA[<p>When upgrading a Mac from Mac OS X 10.4 (Tiger) to 10.5 (Leopard), remember that network accounts are <em>not</em> included if you do an archive and install and choose to migrate existing users. If a network account had its home folder at <code>/Users/jbloggs</code> then it will have been moved to <code>/Previous Systems.localized/2009-11-06_0346/Users/jbloggs</code> (although the date portion will be the date that you did your install).</p>

<p>This applies to <a href="http://docs.info.apple.com/article.html?path=ServerAdmin/10.5/en/c7od45.html">network accounts which authenticate against Active Directory and do not have a mobile account</a>.</p>

<p>Why my place of work used to setup Macs with the option for create mobile account at login turned off is a mystery to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://reliablybroken.com/b/2009/11/network-users-and-mac-10-5-archive-and-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Active Directory FILETIME values in Python</title>
		<link>http://reliablybroken.com/b/2009/09/working-with-active-directory-filetime-values-in-python/</link>
		<comments>http://reliablybroken.com/b/2009/09/working-with-active-directory-filetime-values-in-python/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 16:27:16 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://reliablybroken.com/b/?p=282</guid>
		<description><![CDATA[How To Convert a UNIX time_t to a Win32 FILETIME or SYSTEMTIME:


  Under Win32 platforms, file times are maintained primarily in the form of
  a 64-bit FILETIME structure, which represents the number of 100-nanosecond
  intervals since January 1, 1601 UTC (coordinate universal time).


It just so happens that Microsoft Active Directory uses the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://support.microsoft.com/kb/167296">How To Convert a UNIX time_t to a Win32 FILETIME or SYSTEMTIME</a>:</p>

<blockquote>
  <p>Under Win32 platforms, file times are maintained primarily in the form of
  a 64-bit FILETIME structure, which represents the number of 100-nanosecond
  intervals since January 1, 1601 UTC (coordinate universal time).</p>
</blockquote>

<p>It just so happens that <a href="http://www.microsoft.com/windowsserver2008/en/us/active-directory.aspx">Microsoft Active Directory</a> uses the same 64-bit value to store some time values. For example <a href="http://msdn.microsoft.com/en-us/library/ms675098(VS.85).aspx">the <code>accountExpires</code> attribute</a> is in this format. Linked below is a module for Python with utility functions for converting between <a href="http://docs.python.org/library/datetime.html">Python&#8217;s datetime instances</a> and Microsoft&#8217;s FILETIME values.</p>

<p>Very handy if you enjoy querying Active Directory for login accounts that are due to expire. And who wouldn&#8217;t enjoy that? On a Monday.</p>

<p><a href="/b/wp-content/uploads/2009/09/filetimes.py">Download filetimes.py module for converting between FILETIME and <code>datetime</code> objects.</a> This code is released under a 2-clause BSD license.</p>

<p>Example usage:</p>

<pre><code>&gt;&gt;&gt; from filetimes import filetime_to_dt, dt_to_filetime, utc
&gt;&gt;&gt; filetime_to_dt(116444736000000000)
datetime.datetime(1970, 1, 1, 0, 0)
&gt;&gt;&gt; filetime_to_dt(128930364000000000)
datetime.datetime(2009, 7, 25, 23, 0)
&gt;&gt;&gt; "%.0f" % dt_to_filetime(datetime(2009, 7, 25, 23, 0))
'128930364000000000'
&gt;&gt;&gt; dt_to_filetime(datetime(1970, 1, 1, 0, 0, tzinfo=utc))
116444736000000000L
&gt;&gt;&gt; dt_to_filetime(datetime(1970, 1, 1, 0, 0))
116444736000000000L
</code></pre>

<p>I even remembered to write tests for once!</p>
]]></content:encoded>
			<wfw:commentRss>http://reliablybroken.com/b/2009/09/working-with-active-directory-filetime-values-in-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
