<?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>!NSFW</title>
	<atom:link href="http://nsfw.ibnmasud.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nsfw.ibnmasud.com</link>
	<description>Safe for Work</description>
	<lastBuildDate>Thu, 13 Oct 2011 16:48:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Find locked AD user accounts</title>
		<link>http://nsfw.ibnmasud.com/find-locked-ad-user-accounts/</link>
		<comments>http://nsfw.ibnmasud.com/find-locked-ad-user-accounts/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 18:58:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=143</guid>
		<description><![CDATA[To get a quick list of users in AD whose accounts are locked, you can use Quest Software&#8217;s free ActiveRoles Management Shell for Active Directory PS-Snapin. This snap-in simplifies a lot of the AD related functions through Powershell, finding locked user accounts is just one of them. get-QADUser -Locked]]></description>
			<content:encoded><![CDATA[<p>To get a quick list of users in AD whose accounts are locked, you can use Quest Software&#8217;s free <a href="http://www.quest.com/powershell/activeroles-server.aspx">ActiveRoles Management Shell for Active Directory</a> PS-Snapin. This snap-in simplifies a lot of the AD related functions through Powershell, finding locked user accounts is just one of them.</p>
<p><code>get-QADUser -Locked</code></p>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/find-locked-ad-user-accounts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>extract &amp; untar</title>
		<link>http://nsfw.ibnmasud.com/extract-untar/</link>
		<comments>http://nsfw.ibnmasud.com/extract-untar/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 23:17:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=139</guid>
		<description><![CDATA[This is a one step command to extract and untar a tar.gz file. tar zxvf filename.tar.gz z = Gunzip(uncompress) it before extracting, used on file ending in .tar.gz or .tgz x = Extract the contents of the TAR file v = Verbose &#8211; display contents as it is tarring or extracting f = Filename to [...]]]></description>
			<content:encoded><![CDATA[<p>This is a one step command to <strong>extract </strong>and <strong>untar</strong> a tar.gz file.</p>
<p><code>tar zxvf filename.tar.gz</code></p>
<p>z = Gunzip(uncompress) it before extracting, used on file ending in .tar.gz or .tgz<br />
x = Extract the contents of the TAR file<br />
v = Verbose &#8211; display contents as it is tarring or extracting<br />
f =  Filename to follow</p>
<p>Note: If the file does not have &#8220;.gz&#8221; extension that means its already uncompressed and one has to just extract it using &#8220;tar xvf&#8221; command.</p>
<p>This is a two step command to <strong>extract </strong>and <strong>untar</strong> the file.</p>
<p><code>gunzip filename.tar.gz</code></p>
<p><code>tar xvf filename.tar</code></p>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/extract-untar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH tunnels</title>
		<link>http://nsfw.ibnmasud.com/ssh-tunnels/</link>
		<comments>http://nsfw.ibnmasud.com/ssh-tunnels/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 19:24:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=136</guid>
		<description><![CDATA[Everyone knows you can use SSH to tunnel traffic through a remote host running an SSH server. This can allow you to use the web, for instance, as if you were at that remote host. You do this by creating a SOCKS proxy and then setting your local browser to use this proxy. $ssh -D [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone knows you can use SSH to tunnel traffic through a remote host running an SSH server. This can allow you to use the web, for instance, as if you were at that remote host. You do this by creating a SOCKS proxy and then setting your local browser to use this proxy. </p>
<p><code>$ssh -D 8888 username@remotesshserver</code></p>
<p>This command tells your machine to create a tunnel to the remote ssh server and create a proxy on your local machine at port 8888 for you to use.</p>
<p>Now all you need to do is configure your browser to use this proxy. </p>
<p><code>Server: localhost or 127.0.0.1<br />
Port: 8888</code></p>
<p>Although using this proxy through firefox will secure your web traffic, it will not hide your DNS queries. With SOCKS 5 in Firefox you can specify which side of the proxy handles DNS lookups. This can be done by setting <b>network.proxy.socks_remote_dns = true</b> in about:config.</p>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/ssh-tunnels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anatomy of an ISDN call</title>
		<link>http://nsfw.ibnmasud.com/anatomy-of-an-isdn-call/</link>
		<comments>http://nsfw.ibnmasud.com/anatomy-of-an-isdn-call/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 17:02:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=127</guid>
		<description><![CDATA[This is high-level overview of an ISDN call. Call Setup 993697mS ISDNL3Tx: v=0 peb=5 ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=0011(Remote) Message Type = Setup InformationElement = BearerCapability 0000 04 03 80 90 a2 InformationElement = CHI 0000 18 03 a9 83 97 InformationElement = CallingPartyNumber 0000 6c 0c 00 80 33 30 33 35 35 35 [...]]]></description>
			<content:encoded><![CDATA[<p>This is high-level overview of an ISDN call.</p>
<p><strong>Call Setup</strong></p>
<pre>993697mS ISDNL3Tx: v=0 peb=5
            ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=0011(Remote)
            Message Type = Setup
                InformationElement = BearerCapability
             0000 04 03 80 90 a2
                InformationElement = CHI
             0000 18 03 a9 83 97
            InformationElement = CallingPartyNumber
             0000 6c 0c 00 80 33 30 33 35 35 35 31 32 30 34
                InformationElement = CalledPartyNumber
             0000 70 0b 80 37 32 30 34 34 34 35 32 33 37          </pre>
<p><strong>Call Handling Information</strong></p>
<pre>993737mS ISDNL3Rx: v=0 peb=5
            ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=0011(Local)
            Message Type = CallProceeding
                InformationElement = CHI
            0000 18 03 a9 83 97= use B channel 23          </pre>
<p><strong>Phone rings on the other side</strong></p>
<pre>993746mS ISDNL3Rx: v=0 peb=5
            ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=0011(Local)
            Message Type = Alerting</pre>
<p><strong>The other side answers the call</strong></p>
<pre>1005111mS ISDNL3Rx: v=0 peb=5
            ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=0011(Local)
            Message Type = Connect
                InformationElement = PI
            0000 1e 02 81 82
                InformationElement = Shift 6
                InformationElement = ??(28)
            0000 28 0e 31 73 74 20 32 20 77 69 72 73 20 44 43 50</pre>
<p><strong>Speech path established</strong></p>
<pre> 1005112mS ISDNL3Tx: v=0 peb=5
            ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=0011(Remote)
            Message Type = ConnectAck</pre>
<p><strong>Call disconnected</strong></p>
<pre> 1007058mS ISDNL3Rx: v=0 peb=5
            ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=0011(Local)
            Message Type = Disconnect
                InformationElement =
            0000 08 02 81 90=Cause code 90=Normal call clearing    </pre>
<p><strong>Channel Released by provider </strong></p>
<pre> 1007059mS ISDNL3Tx: v=0 peb=5
            ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=0011(Remote)
            Message Type = Release</pre>
<p><strong>Channel free for new use</strong></p>
<pre> 1007077mS ISDNL3Rx: v=0 peb=5
            ISDN Layer3 Pcol=08(Q931) Reflen=2 ref=0011(Local)
            Message Type = ReleaseComplete</pre>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/anatomy-of-an-isdn-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quest ActiveRoles Management Shell for Active Directory</title>
		<link>http://nsfw.ibnmasud.com/find-ad-users-with-passwords-that-dont-expire/</link>
		<comments>http://nsfw.ibnmasud.com/find-ad-users-with-passwords-that-dont-expire/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 22:08:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=124</guid>
		<description><![CDATA[Quest Software&#8217;s free ActiveRoles Management Shell for Active Directory PS-Snapin simplifies a lot of the AD related functions through Powershell. Following is a list of some commonly used user related actions. Finding non-expiring passwords get-QADUser -PasswordNeverExpires Finding disabled accounts get-qaduser -disabled Enabling disabled accounts enabled-qaduser -identity]]></description>
			<content:encoded><![CDATA[<p>Quest Software&#8217;s free <a href="http://www.quest.com/powershell/activeroles-server.aspx">ActiveRoles Management Shell for Active Directory</a> PS-Snapin simplifies a lot of the AD related functions through Powershell. Following is a list of some commonly used user related actions. </p>
<p>Finding non-expiring passwords<br />
<code>get-QADUser -PasswordNeverExpires</code></p>
<p>Finding disabled accounts<br />
<code>get-qaduser -disabled</code></p>
<p>Enabling disabled accounts<br />
<code>enabled-qaduser -identity <username></code></p>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/find-ad-users-with-passwords-that-dont-expire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote management of Exchange 2010 using PowerShell</title>
		<link>http://nsfw.ibnmasud.com/remote-management-of-exchange-2010-using-powershell/</link>
		<comments>http://nsfw.ibnmasud.com/remote-management-of-exchange-2010-using-powershell/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 16:57:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=118</guid>
		<description><![CDATA[You can run powershell commands on your Exchange 2010 server from machines whether or not they have the Exchange Management Tools installed using implicit remoting. Even when you run the Exchange Management Shell on your exchange server, you&#8217;re essentially creating a powershell remoting session. The following steps take place in the background when you click [...]]]></description>
			<content:encoded><![CDATA[<p>You can run powershell commands on your Exchange 2010 server from machines whether or not they have the Exchange Management Tools installed using implicit remoting.</p>
<p>Even when you run the Exchange Management Shell on your exchange server, you&#8217;re essentially creating a powershell remoting session. The following steps take place in the background when you click the EMS icon:</p>
<li>Load the Microsoft.Exchange.Management.PowerShell.E2010 snap-in gets loaded</li>
<li>The RemoteExchange.ps1 script is dot sourced</li>
<li>The Connect-ExchangeServer function is executed</li>
<p>You can set up implicit remoting from any maching using powershell v2. This imports the commands from your exchange server to your local powershell session so you don&#8217;t need any Exchange tools installed.</p>
<p>First we create a session using the New-PSSession cmdlet:</p>
<p><code>$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://&lt;CAS FQDN&gt;/PowerShell/ -Authentication Kerberos</code></p>
<p>Then, import the session using the Import-PSSession cmdlet:</p>
<p><code>Import-PSSession $s</code></p>
<p>The Exchange Management Shell commands are now imported into the local PowerShell session.</p>
<p>You could use the same method to setup a scheduled task from your machine to run a commands on your exchange server.</p>
<p>[source: <a href="http://www.mikepfeiffer.net/2010/02/managing-exchange-2010-with-remote-powershell/"> ]</p>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/remote-management-of-exchange-2010-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active Directory integration in CentOS using SAMBA</title>
		<link>http://nsfw.ibnmasud.com/active-directory-integration-in-centos/</link>
		<comments>http://nsfw.ibnmasud.com/active-directory-integration-in-centos/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 21:22:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=111</guid>
		<description><![CDATA[This is perhaps the best tutorial on how to set up Active Directory integration in CentOS. http://www.linuxmail.info/active-directory-integration-samba-centos-5/ Update: A related link on setting up Kerberos http://www.howtoforge.com/samba_ads_security_mode]]></description>
			<content:encoded><![CDATA[<p>This is perhaps the best tutorial on how to set up Active Directory integration in CentOS.</p>
<p><a href="http://www.linuxmail.info/active-directory-integration-samba-centos-5/">http://www.linuxmail.info/active-directory-integration-samba-centos-5/</a></p>
<p>Update:<br />
A related link on setting up Kerberos<br />
<a href="http://www.howtoforge.com/samba_ads_security_mode">http://www.howtoforge.com/samba_ads_security_mode</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/active-directory-integration-in-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing corrupt system files in Windows</title>
		<link>http://nsfw.ibnmasud.com/fixing-corrupt-system-files-in-windows/</link>
		<comments>http://nsfw.ibnmasud.com/fixing-corrupt-system-files-in-windows/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 16:38:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=105</guid>
		<description><![CDATA[The sfc /scannow command (System File Checker) scans the integrity of all protected Windows 7 (XP or Vista as well) system files and replaces incorrect corrupted, changed, or damaged versions with the correct versions if possible. Running the command requires an elevated command prompt. A log file of the entire operation is created at C:\WINDOWS\LOGS\CBS\CBS.LOG. [...]]]></description>
			<content:encoded><![CDATA[<p>The <code>sfc /scannow</code> command (System File Checker) scans the integrity of all protected Windows 7 (XP or Vista as well) system files and replaces incorrect corrupted, changed, or damaged versions with the correct versions if possible.</p>
<p>Running the command requires an elevated command prompt. A log file of the entire operation is created at <code>C:\WINDOWS\LOGS\CBS\CBS.LOG</code>. </p>
<p>The following command extracts the &#8216;fixes&#8217; from the log and places it in a file called sfcdetails.txt.</p>
<p><code>findstr /c:"[SR]" %windir%\logs\cbs\cbs.log > sfcdetails.txt</code></p>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/fixing-corrupt-system-files-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to tell what distro you are running?</title>
		<link>http://nsfw.ibnmasud.com/how-to-tell-what-distro-you-are-running/</link>
		<comments>http://nsfw.ibnmasud.com/how-to-tell-what-distro-you-are-running/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 22:09:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=97</guid>
		<description><![CDATA[So you inherit a box running linux and you have no idea which flavor of linux it is. How do you find out? If all you need the kernel version you can try uname -a This outputs something like this Linux localhost.localdomain 2.4.20-31.9 #1 Tue Apr 13 18:04:23 EDT 2004 i686 i686 i386 GNU/Linux If [...]]]></description>
			<content:encoded><![CDATA[<p>So you inherit a box running linux and you have no idea which flavor of linux it is. How do you find out?</p>
<p>If all you need the kernel version you can try<br />
<code>uname -a</code></p>
<p>This outputs something like this</p>
<blockquote><p>Linux localhost.localdomain 2.4.20-31.9 #1 Tue Apr 13 18:04:23 EDT 2004 i686 i686 i386 GNU/Linux</p></blockquote>
<p>If you need the actual distro name you can try<br />
<code>cat /etc/*release</code></p>
<p>In Ubuntu it shows up as</p>
<blockquote><p>DISTRIB_ID=Ubuntu<br />
DISTRIB_RELEASE=9.04<br />
DISTRIB_CODENAME=jaunty<br />
DISTRIB_DESCRIPTION=&#8221;Ubuntu 9.04&#8243;</p></blockquote>
<p>Or even<br />
<code>cat /etc/issue</code></p>
<p>which spits out the following on Ubuntu</p>
<blockquote><p>Ubuntu 9.04 \n \l</p></blockquote>
<p>You can combine all three to get the following<br />
<code>uname -a &#038;&#038; cat /etc/*release &#038;&#038; cat /etc/issue</code></p>
<p><strong>Update: </strong><br />
Another one to add to the list<br />
<code>cat /proc/version</code></p>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/how-to-tell-what-distro-you-are-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Batch editing Dial-up or VPN access settings in Active Directory</title>
		<link>http://nsfw.ibnmasud.com/batch-editing-dial-up-or-vpn-access-settings-in-active-directory/</link>
		<comments>http://nsfw.ibnmasud.com/batch-editing-dial-up-or-vpn-access-settings-in-active-directory/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 17:00:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[active directory]]></category>

		<guid isPermaLink="false">http://nsfw.ibnmasud.com/?p=88</guid>
		<description><![CDATA[Script to edit Remote Access Permissions in the Dial-in tab in Active Directory for multiple users in an OU.]]></description>
			<content:encoded><![CDATA[<p>Active Directory doesn&#8217;t let you edit the Dial-up of VPN access policies for multiple users at once through the GUI. You have to edit this setting one at a time for each user. This can be painstaking if you a lot of users. Luckily there is a VB script available like for almost everything else in AD.<br />
<code><br />
Dim aConnection, aCommand, aResult, strLDAPPath, user, objUser<br />
Const ADS_PROPERTY_CLEAR = 1<br />
strLDAPPath = InputBox("Please enter the LDAP path of the OU:")<br />
WScript.Echo strLDAPPath<br />
Set aConnection = CreateObject("ADODB.Connection")<br />
Set aCommand = CreateObject("ADODB.Command")<br />
aConnection.Provider = "ADsDSOObject"<br />
aConnection.Open<br />
aCommand.ActiveConnection = aConnection<br />
aCommand.CommandText="<LDAP://" &#038; strLDAPPath &#038; ">;(&#038;(objectCategory=Person)(objectClass=User));distinguishedName;subTree"<br />
Set aResult = aCommand.Execute()<br />
Do While Not aResult.EOF<br />
	strDN = aResult.Fields("distinguishedName")<br />
	WScript.Echo strDN<br />
	Set objUser = GetObject("LDAP://" &#038; strDN)<br />
'	Comment the following line to manage connection through Remote Access Policy<br />
	objUser.Put "msNPAllowDialin", FALSE<br />
'	Uncomment the following line to manage connection through Remote Access Policy<br />
'	objUser.PutEx ADS_PROPERTY_CLEAR, "msNPAllowDialin", 0<br />
	objUser.SetInfo<br />
	aResult.MoveNext<br />
Loop</p>
<p></code><br />
This script will update the access settings for a group of users in a particular OU. Once you run the script, a dialog box will ask you for this OU. Once this is set all users in that OU will be updated. </p>
<p>The AD property this script modifies is &#8216;msNPAllowDialin&#8217;. This property is accepts boolean values. So the three options are </p>
<li>TRUE (to allow access)</li>
<li>FALSE (to deny access)</li>
<p>To manage access via the Remote Access Policy, comment out the<br />
<code><br />
	objUser.Put "msNPAllowDialin", FALSE<br />
</code><br />
and uncomment the<br />
<code><br />
'	objUser.PutEx ADS_PROPERTY_CLEAR, "msNPAllowDialin", 0<br />
</code><br />
line.</p>
]]></content:encoded>
			<wfw:commentRss>http://nsfw.ibnmasud.com/batch-editing-dial-up-or-vpn-access-settings-in-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

