<?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>Edward Stafford&#187; Social Media and Networking</title>
	<atom:link href="http://www.edwardstafford.com/category/social-media-and-networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edwardstafford.com</link>
	<description>Technologist, Artist, and Geek</description>
	<lastBuildDate>Thu, 12 Aug 2010 17:59:40 +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>How-to: Active Directory Authentication with WordPress</title>
		<link>http://www.edwardstafford.com/2008/07/15/36/</link>
		<comments>http://www.edwardstafford.com/2008/07/15/36/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 22:25:45 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Social Media and Networking]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/blog/2008/07/15/36/</guid>
		<description><![CDATA[Why Use Active Directory with WordPress? I recently set up a WordPress Blog internally for our company to use over our intranet to help improve communication, collaborate, share and develop ideas, and stay informed about company announcements or current events.. etc. One of the requirements I had was to allow authentication against our Active Directory. [...]]]></description>
			<content:encoded><![CDATA[<h2>Why Use Active Directory with WordPress?</h2>
<p>I recently set up a WordPress Blog internally for our company to use over our intranet to help improve communication, collaborate, share and develop ideas, and stay informed about company announcements or current events.. etc.</p>
<p>One of the requirements I had was to allow authentication against our Active Directory. Yes, we operate a Windows network primarily, but you can also authenticate against other LDAP directories as well. This was important from an IT position as well as the participants of the blog. I felt people would be more likely to participate if they didn&#8217;t have to manage separate user accounts for each service on the intranet. I also set up a Wiki that is Active Directory enabled. I&#8217;ll post about that at a later time. The point is, it makes little sense to create different credentials for each user with each new service. It not only becomes a hassle for IT to track and manage the accounts, it&#8217;s also a drag for participants to keep track of and manage their username and password pairs for each service. The result would most likely lead to lack of use and that is not what we want.</p>
<p>Integrating the existing Active Directory accounts means that each participant can access these services using the same credentials they use to access or log into their network accounts and desktops. When time comes to change passwords, you need only to update the Active Directory account and your done. Simple! What could be better?</p>
<h2><strong>Starting Point</strong></h2>
<p>The first thing we needed to do was find out how to include AD Authentication with WordPress 2.5. There are a small number of plugins that claim to allow AD Authentication, but from what I came across, most of them were older and no longer actively maintained. But&#8230;there were two in particular that still showed signs of being actively maintained and had promise.</p>
<p>The first was was aptly called &#8220;<a href="http://wordpress.org/extend/plugins/active-directory-authentication/" target="_blank">Active Directory Authentication</a>&#8221;</p>
<p>The other plugin and the ultimately the one I managed to successfully include is <a href="http://wordpress.org/extend/plugins/wpdirauth/" target="_blank">wpDirAuth</a>.</p>
<h2>The Trials</h2>
<p>Although I was able to get wpDirAuth to work with WordPress 2.5, there was a catch. The current &#8220;Official&#8221; release of wpDirAuth as of this writing is version 1.2 which is not compatible with WordPress 2.5 so there was some work involved to make this happen. I visited the wpDirAuth plugin page to look at the install directions. They seemed easy enough. It wasn&#8217;t until I actually installed and activated the plugin that I realized it wouldn&#8217;t work. My next stop was the support channel that the author set up to help troubleshoot install and authentication issues. It was here that I learned there was a patch already available and provided by a generous wpDirAuth user &#8211; <strong>Adam Yearout.</strong> I applied the patch and then tried to login with my network credentials again, and &#8230; No luck! By now I was scratching my head. Searching and reading all the information I could find, I finally found myself on the wpDirAuth Developer Support Channel. This was another channel set up specifically for developers. It was here that I uncovered some clues as to what was happening and a small code tweak that was necessary to overcome the problem. Apparently, the author of the plugin assumed that the login name was also the name associated with the Active Directory Account Email, which in most cases is true, but not always. For example username: johndoe would by default have an email johndoe@domain.com. In my case, my email and name and login name were not the same, so the logic that the plugin author used would not work. The good news is that the fix is a fairly simple one if you know where to look and the dev channel contained all the clues needed to find the info.</p>
<h2>Setting up wpDirAuth with WordPress 2.5</h2>
<p>For this how-to, I am using wordpress 2.5 installed on an Ubuntu 8.04 LTS server With Apache2 and PHP5. There is no GUI and I am not running an ftp server on this server so all settings and changes are completed using putty over SSL.<span id="more-36"></span></p>
<p>So lets get to it. Setting up AD Authentication was not as straight forward as I had hoped and required a few extra steps along the way.</p>
<p>The first step is to <a title="download the wpDirAuth plugin" href="http://downloads.wordpress.org/plugin/wpdirauth.1.2.zip">download the wpDirAuth plugin</a> from the WordPress plugins section.</p>
<p>From a terminal or if logged into the server via Putty, change to your home directory and get the latest version of the wpDirAuth plugin.</p>
<div class="myCode"><strong>cd /home/your_account_name<br />
wget http://downloads.wordpress.org/plugin/wpdirauth.1.2.zip</strong></div>
<div class="myNotes"><strong>Note</strong>: the file is compressed as a .zip so you may need to run:</p>
<p><strong>sudo apt-get install unzip</strong></p>
<p>before you can extract the files.</p></div>
<p>Next extract the files by executing:</p>
<div class="myCode"><strong>unzip wpdirauth.1.2.zip</strong></div>
<p>Now you have a new directory called wpdirauth.1.2 in your home directory.<br />
Move into the new directory and list the contents using</p>
<div class="myCode"><strong>cd wpdirauth.1.2<br />
ls</strong></div>
<p>Now you will see the wpdirauth directory. You need to move this entire directory to your WordPress plugins directory.</p>
<div class="myNotes"><strong>Note</strong>:The following instructions and paths are specific to my server. You may need alter these instructions to meet your needs.</div>
<p>To move the extracted wpdirauth directory, make sure you are in the wpdirauth.1.2 directory and execute the command:</p>
<div class="myCode"><strong>cp -r wpdirauth /var/www/wpblog/wp-content/plugins</strong></div>
<p>Now we need to move into the actual WordPress Blog directory where our files are hosted by executing the command:</p>
<div class="myCode"><strong>cd /var/www/wpblog/wp-content/plugins</strong></div>
<p>Now if you execute</p>
<div class="myCode"><strong>ls</strong></div>
<p>you should see the wpdirauth plugin folder. Once again, we will change directories and move into the hosted wpdirauth directory using:</p>
<div class="myCode"><strong>cd wpdirauth</strong></div>
<p>This is where the editing (and the fun) begins.<br />
Remember, we need to make some changes before we activate this plugin in WordPress 2.5 or it will not work.</p>
<h2>Patching the wpdirauth plugin</h2>
<p>Before making any changes to our files, it&#8217;s alway a good idea to make some backups.</p>
<p>From the wpdirauth execute the command:</p>
<div class="myCode"><strong>cp wpdirauth.php wpdirauth.php.orig</strong></div>
<p>Next apply the patch that was just downloaded. This patch will make changes to the wpdirauth.php file, and update the Plug-in version for 1.2 to 1.3</p>
<p>Apply the patch by executing the command:</p>
<div class="myCode"><strong>patch -p1 &lt; ../wpDirAuth-1.2-to-1.3.patch</strong></div>
<div class="myNotes">Note: You need patch installed to execute the following command. If Patch is not installed, you can install it by executing:</p>
<p><strong>sudo apt-get install patch</strong></div>
<h2>Editing the plugin</h2>
<p>Once the patch is installed, your Active Directory authentication should for most people. But we are not done yet.</p>
<p>There is an issue related to Active Directory users names and their email addresses. Active Directory user accounts that are also created with an email address, are by default given an address equal to the login name.<br />
For example an Active Directory user created with a login name of johndoe would have an email address of johndoe@domain.com. The problem arises in the way that wpDirAuth authenticates against Active Directory using the email address. If at some point, the users default email address is changed, the login name does not match the email address and authentication fails. The fix is a simple one if you know where to look.</p>
<p>To prevent authentication failure due to the login name and email mismatch, you need to make a small edit to the wpdirauth.php file. Start by executing the following command:</p>
<div class="myCode"><strong>sudo nano wpdirauth.php</strong></div>
<div class="myNotes"><strong>Note</strong>: I am using nano to edit files on the system. You can use any text editor you have available on your system.</div>
<p>Next, scroll through the file till you find the  wpDirAuth_auth() function at line 246. It should be about 1/4 of the way down the page. Edit this function as follows:</p>
<p>At about line 273 find the line</p>
<div class="myCode">if ($accountSuffix) $username .= $accountSuffix;</div>
<p>and delete or comment it out.</p>
<p>Next move down to about line 284 and look for the line that reads:</p>
<div class="myCode">$filterQuery = &#8220;($filter=$username)&#8221;;</div>
<p>Add a new line after this and enter the following:</p>
<div class="myCode">if ($accountSuffix) $username .= $accountSuffix;</div>
<p>Basicly, we are just moving the line &#8220;if ($accountSuffix) $username .= $accountSuffix;&#8221; down a few lines and adding it after the line &#8221; $filterQuery = &#8220;($filter=$username)&#8221;; &#8221;</p>
<p>This is the snippet of the the  wpDirAuth_auth() function after I made the changes look like this.</p>
<div class="myCode">function wpDirAuth_auth($username, $password)<br />
{<br />
&#8230;.&lt;PHP Code Lines removed for sample&gt;&#8230;.</p>
<p><strong>/**<br />
* This section commented out to enable AD email/username mismatch.<br />
* if ($accountSuffix) $username .= $accountSuffix;<br />
*/</strong></p>
<p><strong></strong>/**<br />
* Only setup protocol value if ldaps is required to help with older AD<br />
* @see http://groups.google.com/group/wpdirauth-support/&#8230;<br />
*/</p>
<p>$protocol = ($enableSsl) ? &#8216;ldaps://&#8217; : &#8221;;</p>
<p>if (!$filter) $filter = WPDIRAUTH_DEFAULT_FILTER;</p>
<p>$filterQuery = &#8220;($filter=$username)&#8221;;</p>
<p><strong> /**<br />
* Next Line added to enable AD email/username mismatch<br />
*/</strong></p>
<p>if ($accountSuffix) $username .= $accountSuffix;</p>
<p>// Connection pool loop &#8211; Haha, PooL LooP<br />
foreach ($controllers as $dc) {</p>
<p>&#8230;.&lt;PHP Code Lines removed for sample&gt;&#8230;.</p></div>
<h2>Activating the Plugin</h2>
<p>One requirement that may still be missing is php&#8217;s LDAP support. If you do not already have support for LDAP enabled in php, you will need to enable it before you can authenticate against the Active Directory.<br />
To enable LDAP in PHP, execute the following command</p>
<div class="myCode"><strong>sudo apt-get install php5-ldap</strong></div>
<p>At this point, and assuming everything went well, it&#8217;s time to log into your WordPress Blog as the WordPress Admin and navigate to the &#8220;settings&#8221; page. From here, you will see a &#8220;Directory Auth&#8221; link at the top of your settings page. click this link to access the Directory Auth setup page and fill in the required fields as they apply to your Active Directory set up.</p>
<p><strong>Enable Directory Authentication</strong> = yes<br />
<strong> Require SSL Login</strong> = Yes if you use SSL Auth, No if you do not.<br />
<strong> Enable SSL Connectivity</strong> = yes if you are using SSL or LDAPS connections, No if you are not.<br />
<strong> Directory Servers (Domain Controllers) </strong>= DNS Name or IP Address of your Active Directory Domain Controller<br />
<strong> Account  Filter</strong> = samAccountName or field to search the username to locate the directory profile. For AD, samAccountName should work.<br />
<strong> Account Suffix</strong> = @yourdomain.com &#8211; This is the suffix for you local domain usen in email addressing in the AD for you local network.<br />
<strong> Base DN</strong> = DC=domainname,DC=com &#8211; Note this will vary depending on you local network and complexity of your AD<br id="dp9s" /><strong>Bind DN</strong> = Blank if you allow Anonymous Binding to your Directory or a username use to pre-bind if you do not.<br />
<strong>Bind Password </strong>= Blank if you allow Anonymous Binding to your Directory or the password of the user used to pre-bind if you do not.</p>
<p>The remainder of the fields are self explanatory and are not critical to successful authentication.</p>
<div class="myNotes"><strong>Note</strong>: One of the easiest ways to get the correct Base DN for Active Directory is to use the ADSI Edit utility</div>
<p>Now save the changes and log out of the WordPress Admin account.<br />
Next attempt to login to WordPress using an Active Directory User Account.</p>
<p>You should now have Active Directory Authentication enabled and working with WordPress.</p>
<p>Remember, your mileage may vary depending on your specific needs and existing network and Active Directory structure.</p>
<p>Have any other tips, or want to share your experience with AD authentication in WordPress? Leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2008/07/15/36/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Good People Rock!</title>
		<link>http://www.edwardstafford.com/2008/04/02/good-people-day-08/</link>
		<comments>http://www.edwardstafford.com/2008/04/02/good-people-day-08/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 01:55:34 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Social Media and Networking]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/blog/2008/04/02/good-people-day-08/</guid>
		<description><![CDATA[On April 2nd, Gary Vaynerchuk (blog-twitter) was hit with a double dose of motivation, posting not one, but 2 videos. His first was a Big Giant Internet Wide Global THANK YOU!! which got him thinking about doing the right thing and helping others and just being a good person. In his own words, &#8220;We need [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm1.static.flickr.com/70/176034043_d0fed3e6a3_m.jpg" title="Life is good" style="padding: 0px 10px 10px 0px; float: left" alt="Life is good" height="140" width="240" />On April 2nd, Gary Vaynerchuk (<a href="http://garyvaynerchuk.com/" target="_blank">blog</a>-<a href="http://twitter.com/garyvee" target="_blank">twitter</a>) was hit with a double dose of motivation, posting not <a href="http://garyvaynerchuk.com/2008/04/02/a-simple-message-to-you/" target="_blank">one</a>, but <a href="http://garyvaynerchuk.com/2008/04/02/april-3rd-2008-is-good-people-day-pass-it-on/" target="_blank">2 videos</a>. His first was a Big Giant Internet Wide Global THANK YOU!! which got him thinking about doing the right thing and helping others and just being a good person. In his own words, &#8220;We need this message of doing good and helping others&#8221;. A lot of the conversations surrounding Social Media,  the internet and life in general are about how to exploit it and turn a profit, Gossip, and conroversy. Does any of that really matter? Well, enough already! Gary has made an official call to action to spend the day on <strong>4-3-2008</strong> spreading the love and talking about Good People!!</p>
<p><strong>A Few Good Men (and Women)</strong></p>
<p><strong>Do know any good people? </strong>Spread the word, talk about them, blog about them, twitter about them, tag them. Do whatever it takes to let world know that <strong>Good People DO exist</strong>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2008/04/02/good-people-day-08/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Twitter has changed my life</title>
		<link>http://www.edwardstafford.com/2008/02/14/26/</link>
		<comments>http://www.edwardstafford.com/2008/02/14/26/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 19:11:43 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Social Media and Networking]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/blog/2008/02/14/26/</guid>
		<description><![CDATA[Yesterday morning (Feb 13/08), I attended the Social Media Breakfast 5 (SMB5) where the focus of the event was set by a single statement: “How Twitter has changed my life — and can change yours”. The event was hosted by Bryan Person and featured presentations by: Scott Monty @scottmonty Laura Fitton @pistachio Doug Haslam @dough [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday morning (Feb 13/08), I attended the <a href="http://www.socialmediabreakfast.com/" title="Social Media Breakfast" target="_blank" id="lp0u">Social Media Breakfast</a> 5 (SMB5) where the focus of the event was set by a single statement: <strong>“How Twitter has changed my life — and can change yours”.</strong></p>
<p>The event was hosted by <a href="http://www.bryper.com/">Bryan Person</a> and featured presentations by:</p>
<p style="margin-left: 40px"><strong>Scott Monty <a href="http://twitter.com/scottmonty" title="@scottmonty" target="_blank" id="s99:">@scottmonty</a> </strong><br />
<strong>Laura Fitton <a href="http://twitter.com/pistachio" title="@pistachio" target="_blank" id="pjnb">@pistachio</a> </strong><br />
<strong>Doug Haslam <a href="http://twitter.com/dough" title="@dough" target="_blank" id="yl0r">@dough</a> </strong><br />
<strong>Jim Storer <a href="http://twitter.com/jstorer" title="@jstorer" target="_blank" id="i.yg">@jstorer</a> </strong></p>
<p><strong>You can view their presentations at: </strong><br />
<font size="1"><a href="http://topazpartners.blogspot.com/2008/02/social-media-breakfast-presentaions-how.html" title="http://topazpartners.blogspot.com/2008/02/social-media-breakfast-presentaions-how.html" id="lsto">http://topazpartners.blogspot.com/2008/02/social-media-breakfast-presentaions-how.html</a> </font><br />
<strong><br />
</strong>Each speaker was allowed 5 minutes to present his/her story and experience, describing how twitter has changed their life and each presented some really great thoughts. It was very interesting to see how they each made twitter work for them.</p>
<p>In keeping with that theme, I figured I could write a quick post to share my experience with twitter, and how it has changed my life with more of a personal twist. <span id="more-26"></span>Let me begin by sharing a little something about myself that you are probably not aware of. Simply put, <u>I struggle with social anxiety</u>. I do not do well in crowds or groups where I am unfamiliar with others or in a setting/environment that I am not familiar with.</p>
<p><strong>Now back to the point:<br />
</strong></p>
<p>Since I&#8217;ve started <a href="http://twitter.com/pixel8r" title="using twitter regularly" target="_blank" id="xjyb">using twitter regularly</a>, it was pretty obvious how useful and valuable it was. Twitter has provided a way to make connections with other people who shared similar interests and ideas. I also found twitter users that, even though I have not made a two-way connection, I choose to &#8220;follow&#8221; for the ideas and bits of info and knowledge they share &#8211; the ability to virtually &#8220;pick their brains&#8221;. For me, this is significant because in the &#8220;real&#8221; world, it is difficult for me to engage others whom I am not already familiar with. Unfortunately, this has given people the impression that I am anti-social, snobbish, and even intimidating (huh?) which couldn&#8217;t be further from the truth.</p>
<p><a href="http://www.mzinga.com/default.asp?"></a><strong><br />
</strong> <strong>So, how has twitter changed my life?<br />
</strong>Twitter has allowed me to make connections, have conversations and get to know people in a way that removes the anxiety. When an opportunity comes about to meet these people in a real world setting, I am more at ease and feel as if I already know them to some degree which helps to reduce the anxiety significantly. I still have a lot of work to do to manage anxiety, but twitter has given me a tool to ease the process and helps to break down the wall that my anxiety creates.</p>
<p>So there you have it.<br />
Has twitter changed your life? Want to leave a comment?<br />
I&#8217;d love to hear from you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2008/02/14/26/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
