<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Doug's Blog</title>
	
	<link>http://blog.dougco.com</link>
	<description>Handily dispensing information to .00000001% of the world's population</description>
	<lastBuildDate>Thu, 19 Apr 2012 17:13:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/dougco" /><feedburner:info uri="dougco" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Installing Fedora 16 with Tips﻿﻿ ﻿﻿﻿﻿</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/xkRVEZLweGA/</link>
		<comments>http://blog.dougco.com/unix/installing-fedora-16-with-tips%ef%bb%bf%ef%bb%bf-%ef%bb%bf%ef%bb%bf%ef%bb%bf%ef%bb%bf/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 21:25:49 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[fedora 16]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=193</guid>
		<description><![CDATA[I have to admit I wasn&#8217;t too thrilled with Fedora 15, it seemed slower than when I had Fedora 13 running. Perhaps it was because I did the &#8220;upgrade&#8221; instead of a fresh install. But I did decide to upgrade my hardware and did a fresh install of Fedora 16. In general, the install went [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="margin-top: 0px; margin-bottom: 0px; margin-left: 10px; margin-right: 10px; border-style: initial; border-color: initial; border-image: initial; border-width: 0px;" title="Fedora16" src="/wp-content/images/fedora_usb_32-bit.png" alt="" width="211" height="211" />I have to admit I wasn&#8217;t too thrilled with Fedora 15, it seemed slower than when I had Fedora 13 running. Perhaps it was because I did the &#8220;upgrade&#8221; instead of a fresh install. But I did decide to upgrade my hardware and did a fresh install of Fedora 16.</p>
<p>In general, the install went well, there are a few areas I have some notes and tips that may help you if you are encountering problems.</p>
<h3><strong>/etc/init.d has changed</strong></h3>
<p>Yes it has, but don&#8217;t panic! You basically use the &#8220;systemctl&#8221; command to handle things now, it is a little tricky because you will need to &#8220;enable&#8221; the service first, THEN you can start/stop/restart like you may have done with init.d in the past. So, for example:</p>
<blockquote><p>systemctl enable httpd.service</p>
<p>systemctl start httpd.service</p></blockquote>
<p>To see a full listing of what is available:</p>
<blockquote><p>systemctl -t service</p></blockquote>
<p>One thing that is not as obvious, are the iptables commands. For this, you can use:</p>
<blockquote><p>/usr/libexec/iptables.init save</p></blockquote>
<p>to save the iptables so they don&#8217;t get lost on reboot.</p>
<h3>Setting Up Virtualbox</h3>
<p>Here are the quick commands to get the awesome Virtualbox going:</p>
<blockquote><p>cd /etc/yum.repos.d/</p>
<p>wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo</p>
<p>yum install kernel-devel kernel-headers gcc dkms</p>
<p>/etc/init.d/vboxdrv setup</p></blockquote>
<h3>I would also install Google Chrome:</h3>
<p>Add following to <em>/etc/yum.repos.d/google.repo</em> file (this is for a 64 bit machine):</p>
<pre>[google-chrome]
name=google-chrome - 64-bit
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub</pre>
<p>Then:</p>
<blockquote>
<pre>yum install google-chrome-stable</pre>
</blockquote>
<h3>Getting Flash Installed</h3>
<blockquote>
<pre>rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm</pre>
<pre>rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux</pre>
<pre>yum check-update</pre>
<pre>yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl</pre>
</blockquote>
<h3>NVidia Drivers</h3>
<p>Lastly, here are my tips on getting NVidia drivers going, I have three monitors across two NVidia graphics cards that each have 1 DVI and 1 VGA, so I have 2 monitors on the DVI ports, and 1 on the VGA.</p>
<p>Get nvidia drivers direct from nvidia.com, go to the drivers/download section and you will download a linux &#8220;.run&#8221; file which is basically a shell command file.</p>
<p>Disable nouveau, by appending the following to /etc/modprobe.d/blacklist.conf</p>
<blockquote><p>blacklist nouveau</p>
<p>options nouveau modeset=0</p></blockquote>
<p>Drop out of &#8220;X&#8221; windows, as root do &#8220;init 3&#8243; &#8212; if that does not work, you can ssh into your host from another to get a non-windows login.</p>
<p>Run the nvidia &#8220;run&#8221; file, i.e. &#8220;sh NVIDIA-Linux-x86_64-295.33.run&#8221;</p>
<p>Start &#8220;X&#8221; back up and configure your xorg.conf. Of course, this is an insanely troublesome thing to do, and since all systems are going to be different I can&#8217;t tell you what to put exactly. But, I can provide my <a href="/wp-content/xorg-conf.txt" target="_blank">xorg.conf file</a> and you can perhaps get some help from checking it out.</p>
<p>One last important note&#8230; when you eventually &#8220;yum update&#8221; your system and get a new kernel, you will need to re-run that NVIDIA run file. For me, my system comes up with blank screens until I ssh into my box from another host, re-run the &#8220;run&#8221; file, and reboot.</p>
<p>Those are my Fedora 16 tips! Hope they help you!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/unix/installing-fedora-16-with-tips%ef%bb%bf%ef%bb%bf-%ef%bb%bf%ef%bb%bf%ef%bb%bf%ef%bb%bf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/unix/installing-fedora-16-with-tips%ef%bb%bf%ef%bb%bf-%ef%bb%bf%ef%bb%bf%ef%bb%bf%ef%bb%bf/</feedburner:origLink></item>
		<item>
		<title>Ubuntu and XBMC</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/F97TT3SkicY/</link>
		<comments>http://blog.dougco.com/movies/ubuntu-and-xbmc/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 05:13:58 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Movies]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xbmc]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=181</guid>
		<description><![CDATA[Xbox Media Center be praised! I just installed this on a linux Ubuntu box, and I used the &#8220;Live&#8221; version which I put onto a USB drive. So, the steps: Download the ISO file from http://xbmc.org/download/ Burn the ISO onto a thumb drive (or CD) Boot your host off the USB/CD, you may need to hit F11 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin-left: 10px; margin-right: 10px; border-style: initial; border-color: initial; border-image: initial; border-width: 0px;" title="xbmc" src="/wp-content/images/as-the-xbmc.gif" alt="" width="240" height="160" />Xbox Media Center be praised!</p>
<p>I just installed this on a linux Ubuntu box, and I used the &#8220;Live&#8221; version which I put onto a USB drive. So, the steps:</p>
<ol>
<li>Download the ISO file from <a href="http://xbmc.org/download/">http://xbmc.org/download/</a></li>
<li>Burn the ISO onto a thumb drive (or CD)</li>
<li>Boot your host off the USB/CD, you may need to hit F11 during bootup to get to your BIOS and choose boot media.</li>
<li>When booting you can either install or boot off the media to see how it works on your setup. Once you verify your setup, you should install.</li>
<li>Hook up to your TV and stereo and go!</li>
</ol>
<p>Now, I actually have a file server in my home that stores all my movies in AVI format. So, my XBMC is a very shrunk down system, you could even put it on a small solid state flash drive which would be nice and fast. Then the question is, how to access the files from another server?</p>
<p>I use NFS on my server and mount them on the XBMC host. However, I had to do a few steps to get this going:</p>
<ol>
<li>You need to install nfs-common to be able to mount. But, the Live install does not have that by default. So, you need to SSH into your XBMC. This is a little tricky, since XBMC will use DHCP to get an IP address and you may not know what IP it has!</li>
<li>Find the IP. One way is to use a &#8220;pinger&#8221; program that will try and ping every IP in your home network range, and once you do that you can try SSH&#8217;ing into each IP that turns up. I use PUTTY if on a windows box to do SSH.</li>
<li>Once logged in, then do &#8220;sudo apt-get update&#8221;</li>
<li>Then do &#8220;sudo apt-get install nfs-common&#8221;</li>
<li>Edit your fstab file, i.e. &#8220;sudo vi /etc/fstab&#8221;</li>
<li>You&#8217;ll want to add your file server, usually something like &#8220;192.168.2.100:/movies                /movies         nfs     defaults        0       0&#8243;</li>
<li>Make sure you mkdir your mount point (/movies in this example) on the xbmc host, then do &#8220;sudo mount -a&#8221; and your xbmc host should mount the movies</li>
<li>In XBMC, go to Video and add &#8220;root file system&#8221; to point to your new mount point!</li>
<li>Enjoy!</li>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/movies/ubuntu-and-xbmc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/movies/ubuntu-and-xbmc/</feedburner:origLink></item>
		<item>
		<title>HTC Incredible 2 Tips</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/3Fp-yJVmPz0/</link>
		<comments>http://blog.dougco.com/cellphone/htc-incredible-2-tips/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 18:22:55 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Cellphone]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[htc]]></category>
		<category><![CDATA[incredible 2]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=177</guid>
		<description><![CDATA[I was using the Android Motorola X for over a year when the GPS function stopped working&#8230; not sure if it was because I dropped the phone or something, but when the big Black Friday shopping day came around I decided to switch to the Incredible 2 from HTC. I had used the Incredible 1 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Incredible2" src="/wp-content/images/HTC_Incredible_2.jpg" alt="" width="265" height="326" />I was using the Android Motorola X for over a year when the GPS function stopped working&#8230; not sure if it was because I dropped the phone or something, but when the big Black Friday shopping day came around I decided to switch to the Incredible 2 from HTC. I had used the Incredible 1 in the past and liked it, I switch to the X for the bigger screen and HDMI output.</p>
<p>But after a while, I missed the small form factor of the Incredible! So now I am back it it and really do like the little things HTC adds to its version of Android. Here are a few tips I can offer after taking the time to bring this new phone up to speed.</p>
<ul>
<li>Install Amazon app store. I like this store, and it does a great job of keeping your apps and making them easy to re-install when you switch phones.</li>
<li>Ignore the Skype that comes w/ the phone. You can&#8217;t (easily) uninstall it, but just go to the Android marketplace and install the official Skype (NOT the one from Verizon) then you can do web calls w/ the front facing camera</li>
<li>If you use Swype (and if you don&#8217;t, you should try it), the Incredible 2 does not come with it installed. You need to visit swype.com and download the &#8220;beta&#8221; which is really better than a beta at this point.</li>
<li>Install Vlingo for voice recognition functions like calling, asking questions, etc. It&#8217;s Android&#8217;s &#8220;Siri&#8221;.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/cellphone/htc-incredible-2-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/cellphone/htc-incredible-2-tips/</feedburner:origLink></item>
		<item>
		<title>Upgrading to Fedora 15 (Lovelock)</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/dFd_tCrRhUA/</link>
		<comments>http://blog.dougco.com/unix/upgrading-to-fedora-15-lovelock/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 19:54:46 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[fedora15]]></category>
		<category><![CDATA[lovelock]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=172</guid>
		<description><![CDATA[After playing damn whack-a-mole with the annoying &#8220;want to upgrade?&#8221; popup that my Fedora 13 install was throwing at me on a daily basis for months, I finally am upgrading to Fedora 15. I decided to jump right to 15 instead of 14, because why go halfway? And, who wouldn&#8217;t jump at installing a release [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin-top: 5px; margin-bottom: 5px; margin-left: 10px; margin-right: 10px;" title="Lovelock" src="http://ranjith.zfs.in/wp-content/uploads/2011/05/fedora15.jpg" alt="" width="246" height="185" />After playing damn whack-a-mole with the annoying &#8220;want to upgrade?&#8221; popup that my Fedora 13 install was throwing at me on a daily basis for months, I finally am upgrading to Fedora 15. I decided to jump right to 15 instead of 14, because why go halfway? And, who wouldn&#8217;t jump at installing a release with such a catchy code name.</p>
<p>If you review the past code names for Fedora, you get the idea that the people making them went from being alcoholics, to Twilight fans, to gassy historians, to Nasa enthusiasts, to Bachelor-Pad viewers who like the letter &#8220;L&#8221;.</p>
<p>But I digress.</p>
<p>Outside of some sys admin changes that can throw you for a loop if you are used to core things not changing, the system feels the same which is nice. One GREAT thing is that I didn&#8217;t have to adjust anything for my 3 screens/monitors configuration to still work!</p>
<p>One oddity is that Thunderbird 6 (I had thunderbird 3 previously) seems to run slow, so I am investigating plugins/settings to see what can be done.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/unix/upgrading-to-fedora-15-lovelock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/unix/upgrading-to-fedora-15-lovelock/</feedburner:origLink></item>
		<item>
		<title>Webmin PCI Compliance</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/q4htwJzqgEA/</link>
		<comments>http://blog.dougco.com/unix/webmin-pci-compliance/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 03:56:49 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[pci compliance]]></category>
		<category><![CDATA[weak cipher]]></category>
		<category><![CDATA[webmin]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=161</guid>
		<description><![CDATA[PCI compliance! Just the phrase is enough to ruin one&#8217;s day. But fear not, here is some handy info on what I&#8217;ve learned. For Webmin, you should: Go to ﻿Webmin -&#62; Webmin Configuration -&#62; SSL Encryption Enter this into Allowed SSL Ciphers field: &#8220;ALL:!ADH:!LOW:!MEDIUM:!SSLv2:!EXP:+HIGH&#8221; Set SSL protocol version to &#8220;3&#8243; You can check from the [...]]]></description>
			<content:encoded><![CDATA[<p>PCI compliance! Just the phrase is enough to ruin one&#8217;s day. But fear not, here is some handy info on what I&#8217;ve learned.</p>
<p>For Webmin, you should:</p>
<ol>
<li>Go to ﻿Webmin -&gt; Webmin Configuration -&gt; SSL Encryption</li>
<li>Enter this into Allowed SSL Ciphers field: &#8220;ALL:!ADH:!LOW:!MEDIUM:!SSLv2:!EXP:+HIGH&#8221;</li>
<li>Set SSL protocol version to &#8220;3&#8243;</li>
</ol>
<p>You can check from the command line to make sure SSL-2 is not allowed via:</p>
<p><strong>openssl s_client -connect localhost:10000 -ssl2</strong></p>
<p>and you should get a line that has &#8220;error&#8221; in it to verify.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/unix/webmin-pci-compliance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/unix/webmin-pci-compliance/</feedburner:origLink></item>
		<item>
		<title>Cisco851 Router Working With Comcast</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/69s7mAJzfKM/</link>
		<comments>http://blog.dougco.com/hardware/cisco851-router-working-with-comcast/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 04:49:55 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[cisco 851]]></category>
		<category><![CDATA[cisco NAT]]></category>
		<category><![CDATA[comcast]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=150</guid>
		<description><![CDATA[I got a Comcast connection the other day so now my house is dual-homed to the Internet! I have DSL with 5 static IPs (which is why I am keeping it), and now a lickity quick Comcast connection. I did have problems getting the NATing properly working on the Cisco851 however. The first attempt had [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin-left: 10px; margin-right: 10px;" title="comcast" src="http://www.dmwmedia.com/wp-content/uploads/images/Comcast%20logo.gif" alt="" width="225" height="70" />I got a Comcast connection the other day so now my house is dual-homed to the Internet! I have DSL with 5 static IPs (which is why I am keeping it), and now a lickity quick Comcast connection.</p>
<p>I did have problems getting the NATing properly working on the Cisco851 however. The first attempt had the Cisco getting the Comcast IP assigned properly w/ DHCP, and the router could ping out just fine. But, no computers behind it using NAT could get out. After much trial-and-error and dozens of google results, I got the following config that worked. I haven&#8217;t fully cleaned it up yet and fleshed out the access lists completely, but the important stuff is there <img src='http://blog.dougco.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Another point to add, is that I had heard things about the MAC address getting tied to the first computer you plug in. When I was troubleshooting, I called Comcast and talked to a tech about this, and it is NOT a worry when you are plugging a router in. They claim they only use the MAC with Comcast equipment. I will say that I had first plugged a laptop in to test the line, and then I switched to the cisco without reseting the box, so my experience seemed to prove the tech&#8217;s statement.</p>
<p>﻿<a href="/wp-content/cisco-config.txt">Click here for the cisco config</a></p>
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/hardware/cisco851-router-working-with-comcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/hardware/cisco851-router-working-with-comcast/</feedburner:origLink></item>
		<item>
		<title>Android Version 2.3.3 Sucks Battery?</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/aisUootG5Sg/</link>
		<comments>http://blog.dougco.com/cellphone/android-version-2-3-3-sucks-battery/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 00:01:08 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Cellphone]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[battery]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=148</guid>
		<description><![CDATA[I just updated my Android X to version 2.3.3 a few days ago, and now it seems my battery doesn&#8217;t last as long! I haven&#8217;t changed any settings, I only keep the bluetooth on (no wi-fi or gps) and whereas my battery would usually last around 14+ hours with normal usage, this new version seems [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated my Android X to version 2.3.3 a few days ago, and now it seems my battery doesn&#8217;t last as long!</p>
<p>I haven&#8217;t changed any settings, I only keep the bluetooth on (no wi-fi or gps) and whereas my battery would usually last around 14+ hours with normal usage, this new version seems to die in around 8 hours.</p>
<p>UPDATE: I had a reason to flush my android and start from scratch, and this seemed to clear up the battery problem! Why? Who knows! Logic would indicate some app was causing a problem, but I am careful on apps and when I reinstalled everything the battery life was still good.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/cellphone/android-version-2-3-3-sucks-battery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/cellphone/android-version-2-3-3-sucks-battery/</feedburner:origLink></item>
		<item>
		<title>Running root commands in PHP via Apache</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/JmQVmsEZJdk/</link>
		<comments>http://blog.dougco.com/websites/running-root-commands-in-php-via-apache/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 16:19:57 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[shell_exec]]></category>
		<category><![CDATA[sudoers]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=144</guid>
		<description><![CDATA[I have a web application that needs to perform shells commands as root within a PHP function, and you would think that would be pretty straight forward&#8230; but it did take my a few googles to get all the details, so here are my handy notes on it. This is on a Linux system running [...]]]></description>
			<content:encoded><![CDATA[<p>I have a web application that needs to perform shells commands as root within a PHP function, and you would think that would be pretty straight forward&#8230; but it did take my a few googles to get all the details, so here are my handy notes on it. This is on a Linux system running Apache, and we&#8217;ll be using &#8220;sudo&#8221; within &#8220;shell_exec&#8221; to run the commands.</p>
<p>The main thing is to edit the /etc/sudoers file, and typically you can (as root) use the ﻿&#8221;visudo&#8221; command to do so.</p>
<p>Make sure apache can run commands, AND not require a password:</p>
<blockquote><p>apache  ALL=(ALL)       NOPASSWD: ALL</p></blockquote>
<p>Then you need to comment out this line:</p>
<blockquote><p>#Defaults    requiretty</p></blockquote>
<p>If you don&#8217;t, then you will see these errors in /var/log/secure: &#8220;sorry, you must have a tty to run sudo&#8221;. Now you are ready to go, and the PHP code is simple:</p>
<blockquote><p>$results = shell_exec(&#8216;sudo date&#8217;);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/websites/running-root-commands-in-php-via-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/websites/running-root-commands-in-php-via-apache/</feedburner:origLink></item>
		<item>
		<title>Borders without Books</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/p0CIeRG_GOQ/</link>
		<comments>http://blog.dougco.com/photos/borders-without-books/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 23:24:34 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Photos]]></category>
		<category><![CDATA[borders books]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=140</guid>
		<description><![CDATA[It is sad to see all these bookstores closing these days, and even the large bookstores are suffering. Perhaps some karma at play, seeing how they forced the little bookstores to close in the past! But nonetheless, I am sad to see this particular Borders shut down, since they had an AWESOME selection of tech [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Borders Books without Books" src="/wp-content/images/borders_without_books.jpg" alt="" width="490" height="276" />It is sad to see all these bookstores closing these days, and even the large bookstores are suffering. Perhaps some karma at play, seeing how they forced the little bookstores to close in the past!</p>
<p>But nonetheless, I am sad to see this particular Borders shut down, since they had an AWESOME selection of tech books! And I was just there a few days ago to see ALL the bookshelves empty of knowledge.</p>
<p>They were selling everything in the store, even those big-ass bookshelves. I thought briefly of putting in a 12 foot high bookshelf in my home office but decided against it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/photos/borders-without-books/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/photos/borders-without-books/</feedburner:origLink></item>
		<item>
		<title>SquirrelMail working with change_sqlpass</title>
		<link>http://feedproxy.google.com/~r/dougco/~3/Ti9Z4E5Fbw0/</link>
		<comments>http://blog.dougco.com/unix/squirrelmail-working-with-change_sqlpass/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 17:30:25 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[change_sqlpass]]></category>
		<category><![CDATA[squirrelmail]]></category>

		<guid isPermaLink="false">http://blog.dougco.com/?p=136</guid>
		<description><![CDATA[I installed SquirrelMail 1.4.21 the other day, and I wanted to add the plugin for password changes. I chose the one that works with MySQL, since I use Dovecot with the MySQL option for users/passwords. I downloaded the change_sqlpass plugin, and ran into an issue where once the user changed the password, it gave an [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin: 10px;" title="Squirrel!" src="/wp-content/images/squirrel.jpg" alt="" width="152" height="152" />I installed SquirrelMail 1.4.21 the other day, and I wanted to add the plugin for password changes. I chose the one that works with MySQL, since I use Dovecot with the MySQL option for users/passwords.</p>
<p>I downloaded the <a href="http://www.squirrelmail.org/plugin_view.php?id=25">change_sqlpass</a> plugin, and ran into an issue where once the user changed the password, it gave an error &#8220;﻿﻿﻿﻿﻿Your session has expired, but will be resumed after logging in again.&#8221;</p>
<p>I had to dig around to find some patches people recommended to use, but that plugin download is over 5 years old and has not been updated with it! You basically need to update one file, &#8220;functions.php&#8221;, so I have done so and you can just <a href="/wp-content/uploads/change_sqlpass_functions.zip">grab it here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dougco.com/unix/squirrelmail-working-with-change_sqlpass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.dougco.com/unix/squirrelmail-working-with-change_sqlpass/</feedburner:origLink></item>
	</channel>
</rss>

