<?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>Cain Manor &#187; Windows</title>
	<atom:link href="http://cainmanor.com/category/tech/windows/feed" rel="self" type="application/rss+xml" />
	<link>http://cainmanor.com</link>
	<description>Your Guide To All Things Cain™</description>
	<lastBuildDate>Wed, 08 Sep 2010 19:25:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Basic Samba-Active Directory troubleshooting using wbinfo</title>
		<link>http://cainmanor.com/tech/basic-samba-active-directory-troubleshooting-using-wbinfo</link>
		<comments>http://cainmanor.com/tech/basic-samba-active-directory-troubleshooting-using-wbinfo#comments</comments>
		<pubDate>Wed, 08 Sep 2010 19:25:39 +0000</pubDate>
		<dc:creator>Greg Cain</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://cainmanor.com/?p=1146</guid>
		<description><![CDATA[This document is intended to step you through some of the basics of troubleshooting samba connectivity with your domain controller, using wbinfo.   This is not intended to show you how to configure Samba to talk to your domain controller.  Others have done a much better job that I can. winbind must be running in [...]]]></description>
			<content:encoded><![CDATA[<p>This document is intended to step you through some of the basics of troubleshooting samba connectivity with your domain controller, using wbinfo.   This is not intended to show you how to configure Samba to talk to your domain controller.  Others have done a much better job that I can.</p>
<p>winbind must be running in order for wbinfo to work, and you need to be connected to your domain.</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-p</span>
Ping to winbindd succeeded on fd <span style="color: #000000;">4</span></pre></div></div>
<p>A simple ping test to see if your DC is alive</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-t</span>
checking the trust secret via RPC calls succeeded</pre></div></div>
<p>Verify that the workstation trust account created when the Samba server is added to the Windows NT domain is working.  This is a good first step to make sure you can talk to your DC<br />
<span id="more-1146"></span></p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-u</span></pre></div></div>
<p>This will list your domain users.   Make sure the users you expect are there</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-a</span> greg.cain<span style="color: #000000; font-weight: bold;">%</span>password</pre></div></div>
<p>This is an easy way to check that your user can authenticate against the domain.  However, I&#8217;d recommend against using it since it will show your password on the command line, in your history, and in the ps command if it&#8217;s executed at the right time (there are many other reasons, but those should be enough to dissuade you.)  Use a dummy account if possible.</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-g</span></pre></div></div>
<p>Show a list of domain groups.   Again, make sure the groups you expect are present.</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-n</span> greg.cain
S-<span style="color: #000000;">1</span>-<span style="color: #000000;">5</span>-<span style="color: #000000;">21</span>-XXXX789314-<span style="color: #000000;">3545391909</span>-<span style="color: #000000;">2802175779</span>-XXXX User <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>
<p>This will get you the SID for the user you&#8217;ve specified (greg.cain in this case.)</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-s</span> S-<span style="color: #000000;">1</span>-<span style="color: #000000;">5</span>-<span style="color: #000000;">21</span>-XXXX789314-<span style="color: #000000;">3545391909</span>-<span style="color: #000000;">2802175779</span>-XXXX
DOMAIN\greg.cain</pre></div></div>
<p>Using the SID you just returned, let&#8217;s make sure the reverse mappings are correct.</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-r</span> greg.cain
16XXX216
16XXX217
....</pre></div></div>
<p>This will show a list of groups that the user greg.cain belongs to.</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-G</span> 16XXX217
S-<span style="color: #000000;">1</span>-<span style="color: #000000;">5</span>-<span style="color: #000000;">21</span>-<span style="color: #000000;">1540789314</span>-<span style="color: #000000;">3545391909</span>-<span style="color: #000000;">2802175779</span>-YYY</pre></div></div>
<p>This converts the GID to the SID.</p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">wbinfo <span style="color: #660033;">-Y</span> S-<span style="color: #000000;">1</span>-<span style="color: #000000;">5</span>-<span style="color: #000000;">21</span>-<span style="color: #000000;">1540789314</span>-<span style="color: #000000;">3545391909</span>-<span style="color: #000000;">2802175779</span>-YYY
16XXX217</pre></div></div>
<p>This is the reverse mapping of the SID to the GID</p>
]]></content:encoded>
			<wfw:commentRss>http://cainmanor.com/tech/basic-samba-active-directory-troubleshooting-using-wbinfo/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup OS-X to quicklook vbs files</title>
		<link>http://cainmanor.com/tech/windows/setup-os-x-to-quicklook-vbs-files</link>
		<comments>http://cainmanor.com/tech/windows/setup-os-x-to-quicklook-vbs-files#comments</comments>
		<pubDate>Sat, 16 Jan 2010 00:13:35 +0000</pubDate>
		<dc:creator>Greg Cain</dc:creator>
				<category><![CDATA[OS-X]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://cainmanor.com/?p=707</guid>
		<description><![CDATA[I have some .vbs files I wrote, and I thought that I should be able to quicklook them just like any other text file. Finding out exactly how wasn&#8217;t terribly easy. I use TextWrangler for all my limited coding needs. You should (emphasis on should) be able to do this for any other editor you [...]]]></description>
			<content:encoded><![CDATA[<p>I have some .vbs files I wrote, and I thought that I should be able to quicklook them just like any other text file.  Finding out exactly how wasn&#8217;t terribly easy.</p>
<p><span id="more-707"></span>I use TextWrangler for all my limited coding needs.  You should (emphasis on should) be able to do this for any other editor you want.  This is what I had to do.</p>
<p>Edit /Applications/TextWrangler.app/Contents/Info.plist.  Towards the top you&#8217;ll see a bunch of file extensions.  I added vbs to the list.<br />
<code><br />
</code>&lt;string&gt;text&lt;/string&gt;<br />
&lt;string&gt;txt&lt;/string&gt;<br />
&lt;string&gt;vbs&lt;/string&gt;<br />
&lt;string&gt;wml&lt;/string&gt;<br />
&lt;string&gt;WML&lt;/string&gt;<code><br />
</code></p>
<p>In the same file, but before the very last&lt;/dict&gt;<br />
&lt;/plist&gt;<br />
Add</p>
<p>&lt;key&gt;UTExportedTypeDeclarations&lt;/key&gt;<br />
&lt;array&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;UTTypeConformsTo&lt;/key&gt;<br />
&lt;array&gt;<br />
&lt;string&gt;public.text&lt;/string&gt;<br />
&lt;string&gt;public.plain-text&lt;/string&gt;<br />
&lt;/array&gt;<br />
&lt;key&gt;UTTypeDescription&lt;/key&gt;<br />
&lt;string&gt;Microsoft Visual Basic&lt;/string&gt;<br />
&lt;key&gt;UTTypeIdentifier&lt;/key&gt;<br />
&lt;string&gt;com.macromates.textmate&lt;/string&gt;<br />
&lt;key&gt;UTTypeTagSpecification&lt;/key&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;com.apple.ostype&lt;/key&gt;<br />
&lt;string&gt;TEXT&lt;/string&gt;<br />
&lt;key&gt;public.filename-extension&lt;/key&gt;<br />
&lt;array&gt;<br />
&lt;string&gt;vbs&lt;/string&gt;<br />
&lt;/array&gt;<br />
&lt;/dict&gt;<br />
&lt;/dict&gt;<br />
&lt;/array&gt;</p>
<p>And then</p>
<p>touch /Applications/TextWrangler.app</p>
]]></content:encoded>
			<wfw:commentRss>http://cainmanor.com/tech/windows/setup-os-x-to-quicklook-vbs-files/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Time Troubleshooting</title>
		<link>http://cainmanor.com/tech/windows-time-troubleshooting</link>
		<comments>http://cainmanor.com/tech/windows-time-troubleshooting#comments</comments>
		<pubDate>Wed, 21 Oct 2009 19:51:22 +0000</pubDate>
		<dc:creator>Greg Cain</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://cainmanor.com/?p=695</guid>
		<description><![CDATA[Windows time has two components. First is the Domain Controller. The Domain Controller should be sync&#8217;ed to the master NTP server in the environment. Microsoft&#8217;s excellent document on the steps necessary can be found HERE. The Windows clients will need to be configured to point to the Domain Controllers (DC&#8217;s.) If you&#8217;ve never installed any [...]]]></description>
			<content:encoded><![CDATA[<p>Windows time has two components.  First is the Domain Controller.  The Domain Controller should be sync&#8217;ed to the master NTP server in the environment.  Microsoft&#8217;s excellent document on the steps necessary can be found <a href="http://support.microsoft.com/kb/816042">HERE</a>.</p>
<p>The Windows clients will need to be configured to point to the Domain Controllers (DC&#8217;s.)   If you&#8217;ve never installed any non-Microsoft utilities, you should be OK by just making sure Windows Time is running.  However, if it is not running, or something has broken time, these are steps that will help you fix your problems.<br />
<span id="more-695"></span><br />
Let&#8217;s check to see if Windows Time is running</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">sc query w32time</pre></div></div>
<p>You should get a result such as</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">SERVICE_NAME: w32time
TYPE               : <span style="color: #b100b1; font-weight: bold;"><span style="color: #cc66cc;">20</span>  WIN32_SHARE_PROCESS</span>
STATE              : <span style="color: #b100b1; font-weight: bold;"><span style="color: #cc66cc;">4</span>  RUNNING <span style="color: #66cc66;">&#40;</span>STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN<span style="color: #66cc66;">&#41;</span></span>
WIN32_EXIT_CODE    : <span style="color: #b100b1; font-weight: bold;"><span style="color: #cc66cc;">0</span>  <span style="color: #66cc66;">&#40;</span>0x0<span style="color: #66cc66;">&#41;</span></span>
SERVICE_EXIT_CODE  : <span style="color: #b100b1; font-weight: bold;"><span style="color: #cc66cc;">0</span>  <span style="color: #66cc66;">&#40;</span>0x0<span style="color: #66cc66;">&#41;</span></span>
CHECKPOINT         : <span style="color: #b100b1; font-weight: bold;">0x0</span>
WAIT_HINT          : <span style="color: #b100b1; font-weight: bold;">0x0</span></pre></div></div>
<p>If you don&#8217;t, start services.msc and start the service and set it to Automatic</p>
<p>Now let&#8217;s make sure that the server is setup correctly.  Check to see if the domain server is our time server.  Note the &#8220;:&#8221; is part of the command.</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">C:\WINDOWS&gt;nltest /dsgetdc:</pre></div></div>
<p>Look for the flag &#8220;TIMESERV.&#8221;  This indicates that the Domain Controller is our Time Server.</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">DC: \\myDomainController.domain.com
Address: \\10.1.99.19
Dom Guid: 9db0908b-8f45-499f-9c20-49905773f553
Dom Name: domain.com
Forest Name: domain.com
Dc Site Name: Default-First-Site-Name
Our Site Name: Default-First-Site-Name
Flags: PDC DS LDAP KDC TIMESERV GTIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS_FOREST CLOSE_SITE
The command completed successfully</pre></div></div>
<p>Check that the client has the correct information</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">w32tm /dumpreg /subkey:parameters</pre></div></div>
<p>The only thing to look for is a Type of NT5DS.  That&#8217;s the protocol we use to speak to the the Domain Controller.  Any other setting is wrong.</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">Value Name      Value Type          Value Data
-------------------------------------------------
&nbsp;
ServiceMain     REG_SZ              SvchostEntry_W32Time
ServiceDll      REG_EXPAND_SZ       C:\WINDOWS\system32\w32time.dll
NtpServer       REG_SZ              time.windows.com,0x1
Type            REG_SZ              NT5DS</pre></div></div>
<p>To sync the server with the domain controller.</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">w32tm /resync /rediscover</pre></div></div>
<p>You should now be getting in sync.  You can see your offset shrinking if you type</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">w32tm /stripchart /computer:myDomainController /samples:<span style="color: #cc66cc;">5</span> /dataonly</pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://cainmanor.com/tech/windows-time-troubleshooting/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSUS Clients not checking in</title>
		<link>http://cainmanor.com/tech/wsus-clients-not-checking-in</link>
		<comments>http://cainmanor.com/tech/wsus-clients-not-checking-in#comments</comments>
		<pubDate>Thu, 18 Jun 2009 15:42:37 +0000</pubDate>
		<dc:creator>Greg Cain</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://cainmanor.com/?p=629</guid>
		<description><![CDATA[On our ESX server, we deployed a bunch of Windows 2003 clients from a template, using the &#8220;Guest Customization&#8221; feature. When you do this, you get a new SID, but you don&#8217;t get a new SUSClientId. Since all the clients have the same SUSClientId, only one of them can talk to the WSUS server at [...]]]></description>
			<content:encoded><![CDATA[<p>On our ESX server, we deployed a bunch of Windows 2003 clients from a template, using the &#8220;Guest Customization&#8221; feature.  When you do this, you get a new SID, but you don&#8217;t get a new SUSClientId.  Since all the clients have the same SUSClientId, only one of them can talk to the WSUS server at a time.  Looking around the internet, I found many different suggestions on how to fix the issue.  I should say I found many suggestions for which reg key to delete.  In the end, I only had to delete one.  It worked for all ~37 of my machines, but it took two passes.   Your mileage may vary.<br />
<span id="more-629"></span><br />
This can be done on one remote server using psexec.  We stop the service, delete the key, start the service and force authorization.</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">psexec <span style="color: #33cc33;">@</span>servers.txt net stop wuauserv
psexec <span style="color: #33cc33;">@</span>servers.txt reg delete &quot;HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate&quot; /v SusClientId /f
psexec <span style="color: #33cc33;">@</span>servers.txt net start wuauserv
psexec <span style="color: #33cc33;">@</span>servers.txt wuauclt.exe /resetauthorization /detectnow</pre></div></div>
<p>Please be aware that you can make your system completely unusable if you break the registry.  Make sure you have a full backup of your system. If anything goes wrong, you may end up losing all your data and reinstalling Windows.   Microsoft says this &#8220;&#8230; is not supported by Microsoft. Use this method at your own risk.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://cainmanor.com/tech/wsus-clients-not-checking-in/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gpresult &#8211; Access Denied</title>
		<link>http://cainmanor.com/tech/gpresult-access-denied</link>
		<comments>http://cainmanor.com/tech/gpresult-access-denied#comments</comments>
		<pubDate>Wed, 29 Apr 2009 06:18:58 +0000</pubDate>
		<dc:creator>Greg Cain</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Work]]></category>
		<guid isPermaLink="false">http://cainmanor.com/?p=569</guid>
		<description><![CDATA[While trying to make sure a GPO got applied on a Windows 2003 Server, I tried to run gpresult. I got &#8220;Access Denied.&#8221; Microsoft&#8217;s recommendation did not work, but it&#8217;s probably worth trying again. CD %windir%\system32\wbem For /f %s in &#40;'dir /b /s *.dll'&#41; do regsvr32 /s %s wmiprvse /regserver I found THIS worked. cd [...]]]></description>
			<content:encoded><![CDATA[<p>While trying to make sure a GPO got applied on a Windows 2003 Server, I tried to run gpresult.  I got &#8220;Access Denied.&#8221;<br />
<span id="more-569"></span></p>
<p>Microsoft&#8217;s <a href="http://support.microsoft.com/kb/932460">recommendation</a> did not work, but it&#8217;s probably worth trying again.</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #b1b100; font-weight: bold;">CD</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">windir</span><span style="color: #33cc33;">%</span>\system32\wbem
<span style="color: #00b100; font-weight: bold;">For</span> /f <span style="color: #33cc33;">%</span><span style="color: #448888;">s</span> <span style="color: #00b100; font-weight: bold;">in</span> <span style="color: #66cc66;">&#40;</span>'<span style="color: #b1b100; font-weight: bold;">dir</span> /b /s *.dll'<span style="color: #66cc66;">&#41;</span> <span style="color: #00b100; font-weight: bold;">do</span> regsvr32 /s <span style="color: #33cc33;">%</span><span style="color: #448888;">s</span>
wmiprvse /regserver</pre></div></div>
<p>I found <a href="http://x220.minasi.com/forum/topic.asp?TOPIC_ID=20825">THIS</a> worked.</p>
<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #b1b100; font-weight: bold;">cd</span> /d <span style="color: #33cc33;">%</span><span style="color: #448888;">windir</span><span style="color: #33cc33;">%</span>\system32
regsvr32 /n /I userenv.dll
<span style="color: #b1b100; font-weight: bold;">cd</span> wbem
mofcomp scersop.mof
gpupdate /force
gpresult</pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://cainmanor.com/tech/gpresult-access-denied/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
