<?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>The Nubby Admin</title>
	
	<link>http://thenubbyadmin.com</link>
	<description>Just a nublet SysAdmin</description>
	<lastBuildDate>Thu, 31 May 2012 22:36:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TheNubbyAdmin" /><feedburner:info uri="thenubbyadmin" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>TheNubbyAdmin</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/TheNubbyAdmin" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2FTheNubbyAdmin" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>Solving “Command or filename not recognized” when flashing HP ProLiant BIOSs using ROMPaq</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/xMGts4YUS64/</link>
		<comments>http://thenubbyadmin.com/2012/05/21/solving-command-or-filename-not-recognized-when-flashing-hp-proliant-bioss-using-rompaq/#comments</comments>
		<pubDate>Mon, 21 May 2012 09:04:22 +0000</pubDate>
		<dc:creator>Wesley David</dc:creator>
				<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2650</guid>
		<description><![CDATA[My Problem<br />
I have an HP ProLiant N40L MicroServer that needed its BIOS upgraded. I downloaded the proper firmware update package from HP&#8217;s support site which includes ROMPaq and the update flat files. I created a bootable USB thumbdrive using the ROMPaq utility, however attempting to update the server&#8217;s BIOS receives this error:<br />
<br />
<br />
RomPaq may take a few minutes to get started, please be patient...<br />
Command or filename not recognized<br />
<br />
<br />
My Solution<br />
Open the SWSetup folder ...]]></description>
			<content:encoded><![CDATA[<h2>My Problem</h2>
<p>I have an HP ProLiant N40L MicroServer that needed its BIOS upgraded. I downloaded the proper firmware update package from HP&#8217;s support site which includes ROMPaq and the update flat files. I created a bootable USB thumbdrive using the ROMPaq utility, however attempting to update the server&#8217;s BIOS receives this error:</p>
<div class="wp_syntax">
<div class="code">
<pre class="dos" style="font-family:monospace;">RomPaq may take a few minutes to get started, please be patient...
Command or filename <span style="color: #000000; font-weight: bold;">not</span> recognized</pre>
</div>
</div>
<h2>My Solution</h2>
<p>Open the SWSetup folder that the ROMPaq installer creates and copy all files from the &#8220;Flat Files&#8221; folder over to the USB drive that the ROMPaq utility modifies to be bootable.</p>
<h2>The Long Story</h2>
<p>After the &#8220;Command or filename not recognized&#8221; error was received, I popped the USB drive into a different machine and inspected the contents. Looking at the AUTOEXEC.BAT file that is on the root showed this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="dos" style="font-family:monospace;"><span style="color: #33cc33;">@</span><span style="color: #b1b100; font-weight: bold;">echo</span> off
<span style="color: #b1b100; font-weight: bold;">echo</span> ROMPAQ may take a few minutes to get started. Please be patient...
rompaq.exe /l:us /<span style="color: #33cc33;">!</span></pre>
</div>
</div>
<p>However, there was no rompaq.exe file anywhere on the drive! Furthermore, there wasn&#8217;t even a ROM file to be seen. Clearly the utility did not create a drive that was capable of flashing my server. Part of the unpacked files included a folder called &#8220;Flat Files&#8221; that included things which made more sense. For example, in that flat files folder was an AUTOEXEC.BAT file that looked like this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="dos" style="font-family:monospace;"><span style="color: #33cc33;">@</span><span style="color: #b1b100; font-weight: bold;">echo</span> off
&nbsp;
<span style="color: #00b100; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">errorlevel</span> == 1 <span style="color: #00b100; font-weight: bold;">goto</span> ENDIT
<span style="color: #00b100; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">errorlevel</span> == 0 <span style="color: #00b100; font-weight: bold;">goto</span> other
:<span style="color: #b100b1; font-weight: bold;">other</span>
<span style="color: #b1b100; font-weight: bold;">echo</span> Next Please<span style="color: #33cc33;">!</span><span style="color: #33cc33;">!</span><span style="color: #33cc33;">!</span>
flash.bat
&nbsp;
:<span style="color: #b100b1; font-weight: bold;">ENDIT</span></pre>
</div>
</div>
<p>As well as a flash.bat file that looked like this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="dos" style="font-family:monospace;">kbd /&quot;flash O41072~1.rom -r 100000,10000 -r 1e0000,10000;q&quot;</pre>
</div>
</div>
<p>And finally an actual ROM file that matched filenames with the line in the flash.bat file. I merely copied all the files in the &#8220;Flat Files&#8221; folder over to the USB key and chose to replace any existing files.</p>
<p>Apparently HP&#8217;s QA group let this get past them. The tool and documentation explicitly state that it will, once run, leave the USB media in a state that can be used to directory update the ProLiant firmware. No additional steps should be needed, according to the documentation. That is clearly not the case in this scenario.</p>
<p>Ever had a similar experience with ROMPaq or is this an oddball case? Let me know in the comments.
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/xMGts4YUS64" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/05/21/solving-command-or-filename-not-recognized-when-flashing-hp-proliant-bioss-using-rompaq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/05/21/solving-command-or-filename-not-recognized-when-flashing-hp-proliant-bioss-using-rompaq/</feedburner:origLink></item>
		<item>
		<title>How do I Use mysqldump on a LAMP Server Running Plesk?</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/bvI9X_CYDDI/</link>
		<comments>http://thenubbyadmin.com/2012/05/18/how-do-i-use-mysqldump-on-a-lamp-server-running-plesk/#comments</comments>
		<pubDate>Fri, 18 May 2012 09:54:07 +0000</pubDate>
		<dc:creator>Wesley David</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[plesk]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2631</guid>
		<description><![CDATA[Plesk has some baked in magic concerning MySQL and the admin account. If you try to use mysql or mysqldump using your root user name or password, it will not be allowed. You&#8217;ll see something like this:<br />
<br />
<br />
&#91;root@server&#93; mysql -u admin -p<br />
ERROR 1045 &#40;28000&#41;: Access denied for user 'admin'@'localhost' &#40;using password: YES&#41;<br />
<br />
<br />
If you want to access MySQL as root, you simply use the command my. What exactly does my do?<br />
<br />
<br />
&#91;root@server&#93; type ...]]></description>
			<content:encoded><![CDATA[<p>Plesk has some baked in magic concerning MySQL and the admin account. If you try to use <code>mysql</code> or <code>mysqldump</code> using your root user name or password, it will not be allowed. You&#8217;ll see something like this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span> mysql <span style="color: #660033;">-u</span> admin <span style="color: #660033;">-p</span>
ERROR <span style="color: #000000;">1045</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">28000</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: Access denied <span style="color: #000000; font-weight: bold;">for</span> user <span style="color: #ff0000;">'admin'</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #ff0000;">'localhost'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>using password: YES<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre>
</div>
</div>
<p>If you want to access MySQL as root, you simply use the command <code>my</code>. What exactly does <code>my</code> do?</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">type</span> my
my is aliased to <span style="color: #000000; font-weight: bold;">`</span>mysql <span style="color: #660033;">-A</span> <span style="color: #660033;">-u</span> admin -p<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>psa<span style="color: #000000; font-weight: bold;">/</span>.psa.shadow<span style="color: #000000; font-weight: bold;">`</span><span style="color: #ff0000;">'</span></pre>
</div>
</div>
<p>So, in order to use mysqldump, one has to use the following command syntax:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-u</span> admin -p<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>psa<span style="color: #000000; font-weight: bold;">/</span>.psa.shadow<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>database<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>outfile-name<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre>
</div>
</div>
<p>Strange but true. Of course, this is for a vanilla installation of Plesk. I&#8217;m sure you can customize your MySQL permissions and groups to behave differently, however I would not advise that. Plesk likes to have things its own way, and it will either break if you change things or set things back to how it likes them on the next update.
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/bvI9X_CYDDI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/05/18/how-do-i-use-mysqldump-on-a-lamp-server-running-plesk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/05/18/how-do-i-use-mysqldump-on-a-lamp-server-running-plesk/</feedburner:origLink></item>
		<item>
		<title>Solving Blank or Apache 2 Test Page Problems (and more) in Plesk 10 on Linux</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/Bilx2Bt4wOM/</link>
		<comments>http://thenubbyadmin.com/2012/05/16/solving-blank-or-apache-2-test-page-problems-and-more-in-plesk-10-on-linux/#comments</comments>
		<pubDate>Wed, 16 May 2012 09:53:26 +0000</pubDate>
		<dc:creator>Wesley David</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[plesk]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2619</guid>
		<description><![CDATA[This won&#8217;t be my usual &#8220;Problem, Solution, Long Story&#8221; style troubleshooting post. There are a few complexities involved that don&#8217;t allow it to fit into that template so easily.<br />
I have a client-facing server running CentOS 5.7 and Plesk 10.3. When clients need web space, I put them on my Plesk server so they have shiny buttons to click when managing their own web space. Recently I had a series of unfortunate events cause an outage on one client.<br />
It ...]]></description>
			<content:encoded><![CDATA[<p>This won&#8217;t be my usual &#8220;Problem, Solution, Long Story&#8221; style troubleshooting post. There are a few complexities involved that don&#8217;t allow it to fit into that template so easily.</p>
<p>I have a client-facing server running CentOS 5.7 and Plesk 10.3. When clients need web space, I put them on my Plesk server so they have shiny buttons to click when managing their own web space. Recently I had a series of unfortunate events cause an outage on one client.</p>
<p>It starts with my craving to have things standardized. All client account domain directories are in lower case. All, that is, except for one: AmazingClient. Their main domain&#8217;s vhost directory is /var/www/vhosts/AmazingClient which, in Plesk-land means that any reference to that client&#8217;s domain is always in that case. It bugs me. More than it should. When I created the client account several months ago, for some inexplicable reason, I used CamelCase in their name. One recent evening I decided to change the capitalization for their account&#8217;s main domain. Simple, right?</p>
<p>I <strong><em>did</em></strong> say that I&#8217;m using Plesk, did I not?</p>
<p>Before I go any further, I know what you might be thinking. &#8220;Domains aren&#8217;t case sensitive! What nonsense are you on about?!&#8221; They&#8217;re not case sensitive when approaching domains from a DNS perspective. However, I&#8217;m looking at this from a filesystem and Plesk user account perspective.</p>
<p>To change something as simple as the case of a domain&#8217;s vhost directory, one cannot merely rename it. There are many configuration files to consider as well as Plesk-specific tasks that rely on the domain&#8217;s directory not being glibly swapped out from underneath it. To change a domain&#8217;s name in Plesk, one has to go into the client&#8217;s control panel, and click on the Websites &amp; Domains tab.</p>
<p style="text-align: center;"><img class="aligncenter" title="Plesk Websites and Domains" src="http://thenubbyadmin.com/wp-content/uploads/2012/05/websites-and-domains.png" alt="" width="568" height="35" /></p>
<p style="text-align: left;">From there you will find the domain that you want to change the case of (remember, this isn&#8217;t about &#8220;domain&#8221; in the DNS sense, but rather the representation of that domain within Plesk and on the filesystem) and click on its link. From there you will come to the Host Settings page for that domain. Once on the Host Settings page, you&#8217;ll have the option to change the domain name. Here comes the trouble: you can&#8217;t change the name merely based on case. Even though Plesk sees the client domain differently in the backend based on case, in this Host Settings interface case is not taken into account. Plesk will complain that the domain already exists. You need to change the domain name to something different, then change it back to the original domain name, minus the capitalization. (Plesk FAIL #1)</p>
<p style="text-align: left;">In my case, I wanted to swing it from AwesomeClient.com, to awesomeclienttemp.com, and then back to awesomeclient.com (sans the capital &#8220;A&#8221; and &#8220;C&#8221;).</p>
<h2 style="text-align: left;">Tipping Over the Edge of Doom</h2>
<p>When trying to move from AwesomeClient.com to awesomeclienttemp.com I received this error:</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">Internal error: [domain path] is out of webspace
Message is out of webspace
File Webspace.php
Line 334
Type PleskFatalException</pre>
</div>
</div>
<p>After that error, the Websites &amp; Domains tab is no longer accessible to that client account. Trying to use it receives the same &#8220;Internal Error: [domain path] is out of webspace&#8221; error.</p>
<p>You see, it appears that Plesk, upon requesting a domain rename, copies the domain&#8217;s existing files and then deletes the old ones. It does not perform a mere rename action (Plesk FAIL #2). This client uses quite a bit of space and it apparently maxed out their quota. I say &#8220;apparently&#8221; because, by a strict accounting for free space and quotas on the server, it should have been allowed &#8211; but just barely. Perhaps there&#8217;s more space that Plesk needs than a simple doubling of existing files. (Plesk FAIL #3?) Plesk certainly didn&#8217;t perform any kind of filesystem or account limitation checking prior to attempting the move. (Plesk FAIL #4)</p>
<p>The client site was still responsive; there didn&#8217;t appear to be any negative effects. I needed to investigate further, but as the night wore on I decided to postpone a thorough examination until another day.</p>
<h2>Ask Not For Whom Your Cell Phone Tolls</h2>
<p>Bright and early the next morning, I got a call. It was from the client.</p>
<p>&#8220;Our website seems to be down, so&#8230; uhh&#8230; if you could look into that&#8230;&#8221;</p>
<p>Super.</p>
<p>Nothing was being served up in response to any page requests for this domain. Apache&#8217;s error logs were showing requests for this client&#8217;s files as hitting in the default vhost root, not their own. Then, it hit me.</p>
<p>Plesk does not use the standard Apache configuration files. I mean, it <em>does</em>, but not really. It auto-generates Apache configuration files based on the information that is stored in its own customer database within MySQL. That&#8217;s why the domain was just fine the evening before, but didn&#8217;t fail until the wee hours of the morning. The configuration files had been latently generated based on the failed attempt at changing the domain account name.</p>
<p>Silly me&#8230; I expected there to be rollback statements in any of the SQL DML statements made to the database. I expected that a fatal error would be caught and changes rolled back. They weren&#8217;t. (Plesk FAIL #5) Silly, silly me.</p>
<p>Of course, I wasn&#8217;t going to be able to change the domain information because the Websites &amp; Domains tab bombed out permanently with an internal error. I couldn&#8217;t access the officially sanctioned means of modifying the domain account. This called for some database mangling.</p>
<h2>Let Pry Through the Portage of the Database</h2>
<p>I logged into <code>mysql</code> and dumped the <code>psa</code> database. From there, I used grep to scour the .sql file for any mention of <code>awesomeclienttemp</code>. Sure enough, the bad change was recorded in the database. There were dozens of records in several tables that pointed to the bad domain. That was causing Apache configuration files to be written with bad data, among other applications. There was also mention of the original, unsullied domain. I guess not all of the SQL statements that are part and parcel of a domain change were able to be executed before the error condition was achieved. (Side note: <em><strong>ROLLBACK!! ROLLBACK!! ROLLBACK!!</strong></em>)</p>
<p>Solving the problem was a simple as searching for and replacing the string awesomeclienttemp with AwesomeClient. I used mysql to perform that, but it could have been done on the dump file and then imported. For those interested, I used the replace() function and performed a select statement first just to make sure that I was changing the data that I expected to. Once satisfied with the results I performed an update statement also using the replace() function. Here&#8217;s an example of changing some values in the <code>dns_recs</code> table of Plesk&#8217;s <code>psa</code> database:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;">mysql&amp;gt<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>displayVal<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'clienttemp'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'Client'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> dns_recs <span style="color: #993333; font-weight: bold;">WHERE</span> displayVal <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%clienttemp%'</span>;
<span style="color: #66cc66;">+</span><span style="color: #808080; font-style: italic;">--------------------------------------------+</span>
<span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>displayVal<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'clienttemp'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'Client'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">+</span><span style="color: #808080; font-style: italic;">--------------------------------------------+</span>
<span style="color: #66cc66;">|</span> mail<span style="color: #66cc66;">.</span>AwesomeClient<span style="color: #66cc66;">.</span>com<span style="color: #66cc66;">.</span>                    <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span> AwesomeClient<span style="color: #66cc66;">.</span>com<span style="color: #66cc66;">.</span>                         <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span> AwesomeClient<span style="color: #66cc66;">.</span>com<span style="color: #66cc66;">.</span>                         <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span> AwesomeClient<span style="color: #66cc66;">.</span>com<span style="color: #66cc66;">.</span>                         <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">+</span><span style="color: #808080; font-style: italic;">--------------------------------------------+</span>
mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">UPDATE</span> dns_recs <span style="color: #993333; font-weight: bold;">SET</span> displayVal<span style="color: #66cc66;">=</span><span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>displayVal<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'clienttemp'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'Client'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> displayVal <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%clienttemp%'</span>;</pre>
</div>
</div>
<p>With the database in a better state, there is still one more thing left to do. Plesk doesn&#8217;t dynamically look to the database for configuration information. It looks to regular files that have been dynamically generated from the database&#8217;s information. That generation happens on a schedule, but can be expedited using the <code>httpdmng</code> command. Specifically, I used:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>psa<span style="color: #000000; font-weight: bold;">/</span>admin<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>httpdmng <span style="color: #660033;">--reconfigure-domain</span> AwesomeClient.com</pre>
</div>
</div>
<p>You could also use the &#8211;reconfigure-all option to perform a regeneration of all domain configuration files. After running <code>httpdmng</code> the domain was up and running.</p>
<h2>Apache Test Page or Blank Page Problems</h2>
<p>I glossed over some of the troubleshooting techniques I used while tracing the problem to its root. If you&#8217;re having trouble with seeing the Apache test page, then search through your httpd.conf file and make sure that your DirectoryIndex directive is set to look for all of the variants of an index.html page that you use. For example, index.html, index.htm. index.php, etc.</p>
<p>Furthermore, just to reiterate, check all of your vhost conf files, such as yourdomain/conf/vhost.conf (or any conf files that reside in that directory) for the DocumentRoot directive and make sure that it&#8217;s pointed to what you want it to be pointed at. Do not edit the files that are named similar to 13279881860.14852200_httpd.include. Those are auto-generated by Plesk and at worst you could cause destruction of files in your domain; at best you will have to re-edit those files every time a new one is generated.</p>
<p>Of course, do a dummy check to make sure that the domain you are trying to access is really resolving to the IP address of your web server. Just&#8230; do it. It takes 5 seconds and you have the outside chance of being pleasantly surprised.</p>
<h2>The Takeaway</h2>
<p>Plesk is rickety. If anyone has used a better control panel for client-facing servers, let me know. I&#8217;ve worked with cPanel and Plesk, but never with any of the others that I&#8217;ve listed in <a href="http://thenubbyadmin.com/2011/12/06/definitive-list-of-web-based-server-control-panels/">this giant list of web based server control panels</a>. Most people will shout &#8220;Just don&#8217;t use a control panel!&#8221; but that&#8217;s not a terribly client friendly option. I&#8217;m not categorically against control panels when used in the correct situations. I <em><strong>am</strong></em>, however, against misbehaving control panels.</p>
<p>Let me know your experiences in the comments below.
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/Bilx2Bt4wOM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/05/16/solving-blank-or-apache-2-test-page-problems-and-more-in-plesk-10-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/05/16/solving-blank-or-apache-2-test-page-problems-and-more-in-plesk-10-on-linux/</feedburner:origLink></item>
		<item>
		<title>“My Neckbeard Grew Three Sizes That Day” or How I Beat a GNU tool with Perl</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/QF8BcFNf9q0/</link>
		<comments>http://thenubbyadmin.com/2012/05/14/my-neckbeard-grew-three-sizes-that-day-or-how-i-beat-a-gnu-tool-with-perl/#comments</comments>
		<pubDate>Mon, 14 May 2012 09:32:58 +0000</pubDate>
		<dc:creator>ScottPack</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2596</guid>
		<description><![CDATA[(Today is another guest post from security expert Scott Pack!)<br />
I spend a lot of time doing text based data processing. A *lot* of time. During an analysis, I often want to do things like look at &#8216;Top Talkers&#8217;, &#8216;Most Frequent Visitors&#8217;, or really anything that comprises a list of unique identifiers sorted by count. As a result, I&#8217;ve translated two actions into a series of pipes:<br />
<br />
What&#8217;s the count of events per thingy: &#8220; &#124; sort &#124; uniq ...]]></description>
			<content:encoded><![CDATA[<p><em>(Today is another guest post from security expert Scott Pack!)</em></p>
<p>I spend a lot of time doing text based data processing. A *lot* of time. During an analysis, I often want to do things like look at &#8216;Top Talkers&#8217;, &#8216;Most Frequent Visitors&#8217;, or really anything that comprises a list of unique identifiers sorted by count. As a result, I&#8217;ve translated two actions into a series of pipes:</p>
<ol>
<li>What&#8217;s the count of events per thingy: &#8220;<span style="font-family: monospace"> | sort | uniq -c | sort -n</span>&#8220;</li>
<li>Who has been doing whatever: &#8220;<span style="font-family: monospace"> | sort -u</span>&#8220;</li>
</ol>
<p>This tends to work pretty well in most cases. Today, however, was not one of those cases. While attempting get a list of unique MACs I started out with a source (i.e. non-uniqued) 16GB text file with one MAC per line. This is where things got annoying. Muscle memory kicked in and since this matched Action #2, I ran the following command: <span style="font-family: monospace">cat macs_all.txt | sort -u &gt;; macs_unique.txt</span></p>
<p>I expected it to take a few minutes, so I went back to the other things I was doing and let it go. I checked back 15 minutes later, and it was still running. Waited 5 minutes&#8230;still running. When the command had been running for 45 minutes, I got fed up and decided that I could do better. Perl, being my go to tool, came to the rescue in the form of hashes. I won&#8217;t go into gritty detail, but a Perl hash is a data structure that consists of a list of key/value pairs. Whenever you assign a value to a key it will add an entry for the key if it doesn&#8217;t exist, or update the value if it does. Since a key cannot be in the same hash multiple times, it makes for a pretty good hack to generate a unique list. This is what I ended up doing:</p>
<div class="wp_syntax">
<div class="code">
<pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -w</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">%unique</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$line</span> <span style="color: #339933;">=</span>  <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">next</span> <span style="color: #b1b100;">unless</span> <span style="color: #0000ff;">$line</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">chomp</span> <span style="color: #0000ff;">$line</span><span style="color: #339933;">;</span>
  <span style="color: #0000ff;">$unique</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">''</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">for</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$key</span> <span style="color: #009900;">&#40;</span> <span style="color: #000066;">keys</span> <span style="color: #0000ff;">%unique</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;$key<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p>This worked significantly better for me. The output was not sorted, but that&#8217;s fine, I didn&#8217;t need it sorted, only unique. The timing information looked a lot better too.</p>
<div class="wp_syntax">
<div class="code">
<pre class="erlang" style="font-family:monospace;">packs@ node1:~&amp;gt<span style="color: #6bb810;">;</span> time cat macs_all<span style="color: #6bb810;">.</span>txt | sort <span style="color: #014ea4;">-</span>u &amp;gt<span style="color: #6bb810;">;</span> macs_unique<span style="color: #6bb810;">.</span>txt
&nbsp;
real    181m12<span style="color: #6bb810;">.</span>417s
user    176m13<span style="color: #6bb810;">.</span>926s
sys     1m42<span style="color: #6bb810;">.</span>335s
packs@ node1:~&amp;gt<span style="color: #6bb810;">;</span> time cat macs_all<span style="color: #6bb810;">.</span>txt | <span style="color: #6bb810;">.</span><span style="color: #014ea4;">/</span>fast_uniq<span style="color: #6bb810;">.</span>pl &amp;gt<span style="color: #6bb810;">;</span> macs_fast_uniqed<span style="color: #6bb810;">.</span>txt
&nbsp;
real    8m9<span style="color: #6bb810;">.</span>074s
user    7m28<span style="color: #6bb810;">.</span>176s
sys     0m46<span style="color: #6bb810;">.</span>271s</pre>
</div>
</div>
<p>The times can&#8217;t really be directly compared, since output from fast_uniq.pl isn&#8217;t actually sorted. Given the pretty substantial difference I think we can reasonably accept the fact that fast_uniq.pl is better in this use case. After seeing this, I&#8217;m tempted to add some functionality so I stop using both sort and uniq entirely.</p>
<p>I&#8217;m interested to hear if anyone else has done something similar or explain to me how much my code sucks.
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/QF8BcFNf9q0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/05/14/my-neckbeard-grew-three-sizes-that-day-or-how-i-beat-a-gnu-tool-with-perl/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/05/14/my-neckbeard-grew-three-sizes-that-day-or-how-i-beat-a-gnu-tool-with-perl/</feedburner:origLink></item>
		<item>
		<title>Restricting and Automating User Commands Through SSH and the authorized_keys File</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/gC6pWrf6XCk/</link>
		<comments>http://thenubbyadmin.com/2012/05/11/2582/#comments</comments>
		<pubDate>Fri, 11 May 2012 10:45:19 +0000</pubDate>
		<dc:creator>Wesley David</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2582</guid>
		<description><![CDATA[Previously I explored how to limit a user&#8217;s ability to runs commands with sudo. As a tangential topic, I needed to restrict the commands that a user account had access to when they connected to the server via SSH. Specifically, I needed just a few commands to be strung together and executed every time this account connected.<br />
The mechanism that I used to do this was with the authorized_keys file. For a thorough explanation of that file, take a peak ...]]></description>
			<content:encoded><![CDATA[<p>Previously I explored <a href="http://thenubbyadmin.com/2012/04/11/how-to-restrict-a-users-sudo-rights-to-only-specific-commands/">how to limit a user&#8217;s ability to runs commands with sudo</a>. As a tangential topic, I needed to restrict the commands that a user account had access to when they connected to the server via SSH. Specifically, I needed just a few commands to be strung together and executed every time this account connected.</p>
<p>The mechanism that I used to do this was with the authorized_keys file. For a thorough explanation of that file, take a peak at the <a href="http://linux.die.net/man/8/sshd">man page for sshd</a>. To explain it very simply, the authorized_keys file holds the public keys of other users/systems that are allowed to connect to that machine. For example, I place my main user account&#8217;s public RSA key into the authorized_keys file on the Linux servers that I manage. When I connect to the remote servers using SSH, it checks to see if I&#8217;m who I say I am by challenging me with the public key that it has stored. The user account on my laptop uses the private key to validate itself (yes, the private key is password protected) and I am then allowed to haxor on the servers to my heart&#8217;s content.</p>
<p>Here&#8217;s an example of a public key:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">ssh-rsa AAAB3NzaC1yc2EAAAADAQABAAABAQDclBxY7lOaolHGaogdcc9GaTQLWMcn2PK4hnQfWlJgeeGqgS66jL4XJyiR9HcgaebBW88Z2sevUxd7g25WhuuRAazfOcElEaE+h6MMPZ94gHY+x+iVAdlNKxLT<span style="color: #000000; font-weight: bold;">/</span>bTvCUXLEft<span style="color: #000000; font-weight: bold;">/</span>yZFpnknnv7jX4ChfSiII9OiAiCzuSdyHt1<span style="color: #000000; font-weight: bold;">/</span>1LgEHgvDIwKMzvTgImm5X<span style="color: #000000; font-weight: bold;">/</span>3IhtOitjJY3Q6yhKQ6LdenQtG<span style="color: #000000; font-weight: bold;">/</span>v+ANqKe6opDuUKc3k9hRmj7aHROxL52paQTEgEMoVLbIoZY4<span style="color: #000000; font-weight: bold;">/</span>yGUzmrZQU45jNqMrbXdAxG4XexZxb7bpTLu91s0DJQGx43JNXwhJVinPgxHLmfyoCSqR1WPqn8E3 testuser<span style="color: #000000; font-weight: bold;">@</span>testserver</pre>
</div>
</div>
<p>The public key, when placed in a system&#8217;s authorized_keys file, can have some extra tidbits added to it that sshd honors. An SSH protocol 2 public key follows this format:</p>
<blockquote><p>options, keytype, base64-encoded key, comment</p></blockquote>
<p>In the above public key, you see the keytype as &#8216;ssh-rsa&#8217; followed by a space, then the key itself followed by a space and finally a comment, which in this case is a username and hostname combination. That&#8217;s a helpful hint to know who this key supposedly belongs to. Notice that there are no options included in the above key, which would come before the keytype.</p>
<p>Some of the options that are available to be parsed by sshd include:</p>
<ul>
<li><strong><code>environment=</code></strong> Changes an environmental variable for the user that is on the receiving end of the connection.</li>
<li><strong><code>from=</code></strong> Only allows connections that use this public key to be initiated from certain hosts. Helpful for the extremely paranoid or the very security conscious (the only difference between the two being pay grade).</li>
<li><strong><code>no-X11-forwarding</code></strong> Because we don&#8217;t need users installing xorg and then browsing the web on a remote instance of Chrome.</li>
</ul>
<p>There are plenty of other options, however the final one that I&#8217;ll mention is the most crucial to this topic: <code>command="command"</code></p>
<p>With the <code>command=</code> option, you can cause a command to be run immediately upon a successful connection to a remote host. Once the command is run, the connection is closed. Notice how that works. The command is immediately run and then once the command finishes, the connection is closed. This is not something that you&#8217;d want to do to a key that is intended to be used interactively by a human.</p>
<p>What could this be good for? In my specific scenario, I am using a backup tool that moves all of the data to stdout which is then piped to ssh for a secure transfer to remote storage. The remote connection would normally look like this: ssh remoteuser@remoteserver &#8221; cat &gt; backupfile.zip&#8221; However, if I edit the authorized keys file, I can restrict the incoming ssh connection to only be allowed to use that specific command.</p>
<p>It&#8217;s just another layer of security to keep people from doing things that they shouldn&#8217;t be doing. Have different ways of achieving a similar goal? Any caveats you know about? Let me know in the comments.
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/gC6pWrf6XCk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/05/11/2582/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/05/11/2582/</feedburner:origLink></item>
		<item>
		<title>The Downfall of a Meta Server or “Why a Mac Mini Makes a Terrible NMS Server”</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/oyQo2wRyzcw/</link>
		<comments>http://thenubbyadmin.com/2012/05/09/the-downfall-of-a-meta-server-or-why-a-mac-mini-makes-a-terrible-nms-server/#comments</comments>
		<pubDate>Wed, 09 May 2012 10:51:55 +0000</pubDate>
		<dc:creator>Wesley David</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2562</guid>
		<description><![CDATA[In a recent post named The Making of a Meta Server or “Why I Bought a Mac Mini as a NMS” I explained why I had chosen a brand new, 2012 Mac Mini as my NMS hardware. After two weeks of mind numbing work, I have officially declared the Mac-Mini-as-a-NMS project a failure.<br />
The main problem surrounded Apple&#8217;s custom EFI. Apple hardware does not use a BIOS, but instead uses EFI (note: not, specifically speaking, UEFI). Or rather, it uses an ancient, bastardized ...]]></description>
			<content:encoded><![CDATA[<p>In a recent post named <a href="http://thenubbyadmin.com/2012/04/25/the-making-of-a-meta-server-or-why-i-bought-a-mac-mini-as-a-nms/">The Making of a Meta Server or “Why I Bought a Mac Mini as a NMS”</a> I explained why I had chosen a brand new, 2012 Mac Mini as my NMS hardware. After two weeks of mind numbing work, I have officially declared the Mac-Mini-as-a-NMS project a failure.</p>
<p>The main problem surrounded Apple&#8217;s custom <a href="http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface">EFI</a>. Apple hardware does not use a BIOS, but instead uses EFI (note: not, specifically speaking, UEFI). Or rather, it uses an ancient, bastardized version of EFI 1.1. There is a BIOS compatibility layer that allows OSs that can only communicate with a BIOS to operate on the hardware. Most notably Windows. Apple&#8217;s OS also runs on a hard disk that has been partitioned using the GPT partitioning scheme, which isn&#8217;t itself a huge deal, but you might be surprised at the anemic support for GPT boot disks in even modern operating systems.</p>
<p>To use the Mac Mini to boot an OS that needs BIOS compatibility and a MBR disk should be relatively easy. Right? Right!</p>
<h2>Unless Apple is involved.</h2>
<p>There are several things that Apple has mutated away from the EFI standard, one of them being not using the EFI system partition for anything except firmware updates. Their custom EFI implementation has the boot process (as well as some extra filesystem drivers) baked in. The whole EFI experience just never worked like I expected it to. The other trouble is that Boot Camp has been changed in OS X Lion. If you wanted to be hand held through the partitioning process and the creation of a hybrid GPT/MBR disk, you&#8217;re invited to use Boot Camp. However the latest alterations only allow media with Windows images to be accepted. You can no longer (from my ability to understand) use Boot Camp to install non-Windows OSs. Of course, it was always unsupported, but at least it was doable.</p>
<p>During the whole process, I used the EFI boot manager <a href="http://refit.sourceforge.net/">rEFIt</a> which apparently only recently works with OS X Lion. I read more about the GPT partitioning scheme than I ever have previously. I learned more about EFI than I ever wanted to know (although all of that information will come in very handy in the near future). I hand-rolled bootable USB thumbdrives. I tweaked partition tables. I did very nearly everything I could think of except rolling my own EFI boot partition. After the hours had steadily ticked away I decided it was no longer worth it.</p>
<p>After countless errors concerning boot media, partition problems, and blinking cursors, I concede that the latest Mac Mini has defeated me. It has been shipped back to Amazon and I can go back to my Apple-less existence. Speaking of Amazon, I believe that they deserve some praise in this.</p>
<p>Amazon made the returns process easier than any return I have ever made. Anywhere. I stated that the reason I returned it was because software I had intended to use with it was not compatible. As a result of the return not being their fault, I had to pay return shipping. Within just a few clicks, Amazon created a return label. I printed it out, boxed the mini up, taped the label to the box and handed it over to the man behind the UPS Store counter. Within 15 seconds I was walking out of the store. I have the fortune of living just a few hundred miles from an Amazon return center located in the Las Vegas area so the return was processed and money credited back within two days. Thank you, Amazon. You were the only bright spot in this debacle.</p>
<p>I am now investigating other pieces of hardware for this project based on the recommendations of several colleagues. If you have a recommendation, share it with me and the rest of my readers in the comments below. I&#8217;ll certainly write about my second attempt at this project as it happens.</p>
<p>In the end, I&#8217;m not mad. The Apple wasn&#8217;t designed to do what I was asking it to do. It was my fault. My only lingering frustration is that the Mac seems to take any standard technology that it uses and twists it in new and different ways so that your familiairty with a standard becomes more of a liability than an asset. Sound like another familiar company that SysAdmins like to pick on? Then again, Apple isn&#8217;t intended to be in the business market. Let us pause and mourn the passing of the Xserve (I handed my G5 Xserve over to Best Buy for free recycling last year. So, so sad&#8230;).</p>
<p>Any similar experiences with an Apple product? Have you managed to wedge an alternate OS on 2012 Apple hardware? Let me know in the comments below.
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/oyQo2wRyzcw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/05/09/the-downfall-of-a-meta-server-or-why-a-mac-mini-makes-a-terrible-nms-server/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/05/09/the-downfall-of-a-meta-server-or-why-a-mac-mini-makes-a-terrible-nms-server/</feedburner:origLink></item>
		<item>
		<title>Remind Me How to Set Up a SOCKS Proxy</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/SNzubFfASV0/</link>
		<comments>http://thenubbyadmin.com/2012/05/07/remind-me-how-to-set-up-a-socks-proxy/#comments</comments>
		<pubDate>Mon, 07 May 2012 10:18:51 +0000</pubDate>
		<dc:creator>Wesley David</dc:creator>
				<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2564</guid>
		<description><![CDATA[I have had to repeatedly jog my faulty memory concerning how to set up a SOCKS proxy. Thus, I am using this blog as my public sticky note to remind myself. Specifically, I forget what options I like to pass through the SOCKS aware SSH client when connecting to the SOCKS aware SSH server.<br />
A SOCKS proxy is easy to set up. It&#8217;s nothing more than an SSH server and an SSH client that speak the SOCKS protocol. In my ...]]></description>
			<content:encoded><![CDATA[<p>I have had to repeatedly jog my faulty memory concerning how to set up a SOCKS proxy. Thus, I am using this blog as my public sticky note to remind myself. Specifically, I forget what options I like to pass through the SOCKS aware SSH client when connecting to the SOCKS aware SSH server.</p>
<p>A SOCKS proxy is easy to set up. It&#8217;s nothing more than an SSH server and an SSH client that speak the SOCKS protocol. In my case, I use OpenSSH. If you use a different SSH server or some other form of making a SOCKS proxy, this little post will be of little use to you. However, stick around because there&#8217;s a note down below concerning the false sense of security many people have when using a SOCKS proxy.</p>
<p>There&#8217;s a handy little option in the OpenSSH client that allows for the creation of a a local port binding that immediately forwards traffic to that port to another machine: -D. After that part of the command, simply include the username and host for the OpenSSH server that you want all local traffic bound for that local port to be relayed through. It makes it all the sweeter if you have RSA keypairs set up between hosts.</p>
<p>In my case, I usually use this set of options:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-fCND</span> localhost:<span style="color: #000000;">8080</span> user<span style="color: #000000; font-weight: bold;">@</span>myserver.thenubbyadmin.com</pre>
</div>
</div>
<p>Let me peel back those other three options that I use:</p>
<ul>
<li><code>-f</code> sends ssh to the background just before the command is executed.</li>
<li><code>-N</code> refuses to execute remote commands. This way I know nothing is going to be run via the SSH connection on the remote machine. I&#8217;m paranoid.</li>
<li><code>-C</code> compresses the TCP traffic. This might not be ideal if you have a good connection as it is stated in the man pages for the OpenSSH client that -C slows down your throughput on fast connections.</li>
</ul>
<h2>Application Support</h2>
<p>The applications that you want to use with the SOCKS proxy need to have explicit options to support it. It&#8217;s not something that can be done underneath the application without its knowledge. For example, most web browsers have an option to use a SOCKS proxy within their advanced options section.</p>
<p>You will want to go to the options page of your application and search for SOCKS support. From there, tell the application to use localhost:port# as the proxy. In my case, I made port 8080 to be the local port that listens for traffic and then forwards it to my remote server.</p>
<p>If you need a secure connection that can be put in place without an application&#8217;s knowledge, you&#8217;ll need to implement a VPN.</p>
<h2>You&#8217;re Not as Anonymous as You Think You Are</h2>
<p>If you&#8217;re using the SOCKS proxy for the purposes of secure browsing, know that your DNS requests are an entirely different application layer traffic. Unless your DNS client is also set up to use the SOCKS proxy, your DNS requests will be plainly visible on the network that you are trying to remain anonymous / protected on. This can cause problems if you&#8217;re on an untrusted network. Owning the DNS servers that a machine is using is one of the most sure ways of wreaking havoc.</p>
<p>Have any other SOCKS tips? Do you use a different client or server? Let me know in the comments.
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/SNzubFfASV0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/05/07/remind-me-how-to-set-up-a-socks-proxy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/05/07/remind-me-how-to-set-up-a-socks-proxy/</feedburner:origLink></item>
		<item>
		<title>How to Make a Bootable CentOS 6 USB Drive</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/K8OCeRzarN8/</link>
		<comments>http://thenubbyadmin.com/2012/05/04/how-to-make-a-bootable-centos-6-usb-drive/#comments</comments>
		<pubDate>Fri, 04 May 2012 14:14:29 +0000</pubDate>
		<dc:creator>Wesley David</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2555</guid>
		<description><![CDATA[When making a bootable USB drive to install CentOS 6 from, you will need two primary partitions, one of them marked with the boot flag. One partition will be the boot partition and one will be a data partition that has the ISO file on it. As of this blog post, to make a CentOS 6 bootable USB drive, you&#8217;ll need a USB drive that has a little more than twice the space that your ISO file itself takes up. ...]]></description>
			<content:encoded><![CDATA[<p>When making a bootable USB drive to install CentOS 6 from, you will need two primary partitions, one of them marked with the boot flag. One partition will be the boot partition and one will be a data partition that has the ISO file on it. As of this blog post, to make a CentOS 6 bootable USB drive, you&#8217;ll need a USB drive that has a little more than twice the space that your ISO file itself takes up. There is a bug that requires the ISO&#8217;s <em>contents</em> to be on the boot partition and the .iso file itself to be on the data partition. In essence you&#8217;re duplicating the ISO file and you still need some space left over for bootloader information. In my case, I&#8217;m using the minimal CentOS image, so space requirements are under 1GB.</p>
<p>At this point, go out and grab the CentOS ISO that interests you. Have it on your filesystem because we&#8217;ll be mounting it and copying some files from it. Once you&#8217;ve got the ISO you can move on to partitioning the drive.</p>
<h2>Partitioning</h2>
<p>First, you&#8217;ll want to partition the USB drive. We&#8217;ll be using plain ol&#8217; MBR style partition tables and two primary partitions. I&#8217;m not going to hand-hold you through this part of the process. Use whatever partitioning tool you want and follow the guidelines below. <a href="http://en.wikipedia.org/wiki/GParted">GParted</a> is fine if you use Gnome, <code>parted</code> is great if you want to use a shell, and <a href="http://en.wikipedia.org/wiki/Fdisk">fdisk</a> works on both Windows and *NIX environments.</p>
<p>The partition layout will be thus:</p>
<ol>
<li>A primary partition that uses the FAT16 filesystem and is at least as big as your ISO plus about 50MB. You need to give it the boot flag.</li>
<li>A primary partition that uses ext2 and is at least as big as your ISO. Preferably you&#8217;ll just use up the rest of your USB drive&#8217;s free space for this partition.</li>
</ol>
<p>Once your partitions are set up, we&#8217;ve got some file moving to do.</p>
<h2>Setting the Filesystems Up</h2>
<p>You&#8217;ll want to mount your two partitions so that you can access them. In my case, the first partition (the FAT16 boot partition) is /dev/sdc1 and the data partition (the one formatted in ext2) is /dev/sdc2. I&#8217;ve mounted sdc1 as /mnt/usbboot and sdc2 as /mnt/usbdata. I will be using that nomenclature throughout the rest of this post.</p>
<p>You&#8217;ll also want to mount your CentOS ISO as a filesystem because we need to copy some files off of it. In my case, I ran <code>mount -o loop /path/to/iso/file.iso /mnt/centosiso</code> and will be using /mnt/centosiso in my examples below. Now that we&#8217;ve got all of our filesystems mounted, we&#8217;ll start the procedures.</p>
<p>First, go to the mounted CentOS iso and copy the /isolinux directory to the boot partition of the USB drive.</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>centosiso<span style="color: #000000; font-weight: bold;">/</span>isolinux <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usbboot</pre>
</div>
</div>
<p>Rename the isolinux folder on the USB drive to syslinux</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usbboot<span style="color: #000000; font-weight: bold;">/</span>isolinux <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usbboot<span style="color: #000000; font-weight: bold;">/</span>syslinux</pre>
</div>
</div>
<p>Rename the isolinux.cfg file to syslinux.cfg</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usbboot<span style="color: #000000; font-weight: bold;">/</span>syslinux<span style="color: #000000; font-weight: bold;">/</span>isolinux.cfg <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usbboot<span style="color: #000000; font-weight: bold;">/</span>syslinux<span style="color: #000000; font-weight: bold;">/</span>syslinux.cfg</pre>
</div>
</div>
<p>Now we need to copy the <em>contents</em> of the /mnt/centosiso/images folder to the USB boot partition. Notice that I emphasis that this is a copy of the contents within the ISO&#8217;s images folder. A little later on we&#8217;ll be copying over the entire ISO as a file.</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>centosiso<span style="color: #000000; font-weight: bold;">/</span>images <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usbboot</pre>
</div>
</div>
<p>Finally, we copy the .iso file itself to the <em>data</em> partition (not the boot partition that we were just working with!):</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>iso<span style="color: #000000; font-weight: bold;">/</span>file.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>usbdata</pre>
</div>
</div>
<p>Once all that is done, we have to install a bootloader. I&#8217;ll use the simple syslinux loader. We want to use our smaller volume (the one that we set the boot flag on up in the partitioning section) as the target for the syslinux command.</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">syslinux <span style="color: #660033;">-i</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdc1</pre>
</div>
</div>
<p>Now, we dismount our USB drive and test it out by booting from it on another system!</p>
<h2 style="text-align: left;"><img class="aligncenter" title="Install CentOS Bootloader" src="http://thenubbyadmin.com/wp-content/uploads/2012/04/install-centos.png" alt="" width="578" height="434" /> </p>
<hr />
<em>Finoto!</em></h2>
<p>You should now have a bootable CentOS 6 USB drive. CentOS 6 is somewhat unique as a result of the bug that requires the images directory to be included on the boot partition, but other than that it&#8217;s relatively straight forward.
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/K8OCeRzarN8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/05/04/how-to-make-a-bootable-centos-6-usb-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/05/04/how-to-make-a-bootable-centos-6-usb-drive/</feedburner:origLink></item>
		<item>
		<title>Finding OS X Version and Build Information From the Command Line</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/3GTBUreHIcY/</link>
		<comments>http://thenubbyadmin.com/2012/05/02/finding-os-x-version-and-build-information-from-the-command-line/#comments</comments>
		<pubDate>Wed, 02 May 2012 14:32:57 +0000</pubDate>
		<dc:creator>Wesley David</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2537</guid>
		<description><![CDATA[To find out what version (and often build number as well) of OS X you&#8217;re running using the Terminal, you&#8217;ve got several options. The first and likely the most obvious (and simple) is using sw_version.<br />
<br />
<br />
macmeta:~ user$ sw_vers<br />
ProductName: Mac OS X<br />
ProductVersion: 10.7.3<br />
BuildVersion: 11D50d<br />
<br />
<br />
You can retrieve the specific information that you want using the following options: -productName &#124; -productVersion &#124; -buildVersion<br />
<br />
<br />
macmeta:~ aoi$ sw_vers -productVersion<br />
10.7.3<br />
<br />
<br />
You can cat out ...]]></description>
			<content:encoded><![CDATA[<p>To find out what version (and often build number as well) of OS X you&#8217;re running using the Terminal, you&#8217;ve got several options. The first and likely the most obvious (and simple) is using sw_version.</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">macmeta:~ user$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.7.3
BuildVersion: 11D50d</pre>
</div>
</div>
<p>You can retrieve the specific information that you want using the following options: <code>-productName | -productVersion | -buildVersion</code></p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">macmeta:~ aoi$ sw_vers <span style="color: #660033;">-productVersion</span>
10.7.3</pre>
</div>
</div>
<p>You can cat out <code>/System/Library/CoreServices/SystemVersion.plist</code> and eyeball the XML that comes back. In my case:</p>
<div class="wp_syntax">
<div class="code">
<pre class="xml" style="font-family:monospace;">macmeta:~ user$ cat /System/Library/CoreServices/SystemVersion.plist
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plist</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProductBuildVersion<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>11D50d<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProductCopyright<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1983-2012 Apple Inc.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProductName<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Mac OS X<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProductUserVisibleVersion<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>10.7.3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProductVersion<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>10.7.3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plist<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre>
</div>
</div>
<p>Or you could merely add <code>grep -C 2 ProductVersion</code>.</p>
<div class="wp_syntax">
<div class="code">
<pre class="xml" style="font-family:monospace;">macmeta:~ user$ cat /System/Library/CoreServices/SystemVersion.plist | grep -C 2 ProductVersion
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProductUserVisibleVersion<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>10.7.3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProductVersion<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>10.7.3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/string<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre>
</div>
</div>
<p>Using <code>system_profiler SPSoftwareDataType</code> gives you lots of information including kernel version:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">macmeta:~ user$ system_profiler SPSoftwareDataType
Software:
&nbsp;
    System Software Overview:
&nbsp;
      System Version: Mac OS X 10.7.3 <span style="color: #7a0874; font-weight: bold;">&#40;</span>11D50d<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      Kernel Version: Darwin 11.3.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: macmeta
      User Name: USER <span style="color: #7a0874; font-weight: bold;">&#40;</span>user<span style="color: #7a0874; font-weight: bold;">&#41;</span>
      Secure Virtual Memory: Enabled
      <span style="color: #000000;">64</span>-bit Kernel and Extensions: Yes
      Time since boot: <span style="color: #000000;">56</span> minutes</pre>
</div>
</div>
<p>Those accustomed to using ye olden *NIX uname -a will find that it only gives the Darwin kernel information.</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">macmeta:~ user$ <span style="color: #c20cb9; font-weight: bold;">uname</span> <span style="color: #660033;">-a</span>
Darwin macmeta.tc.ph.cox.net 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan <span style="color: #000000;">12</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">47</span>:<span style="color: #000000;">41</span> PST <span style="color: #000000;">2012</span>; root:xnu-1699.24.23~<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>RELEASE_X86_64 x86_64</pre>
</div>
</div>
<p>And I saved the ugliest for last! <code>osascript</code> is a tool that can be used to run AppleScript. with the <code>-e</code> option, it will run a single line script that you enter. Let&#8217;s try <code>osascript -e 'system info'</code>:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">macmeta:~ user$ osascript <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'system info'</span>
AppleScript version:2.2.1, AppleScript Studio version:1.5.2, system version:10.7.3, short user name:aoi, long user name:AOI, user ID:<span style="color: #000000;">501</span>, user locale:en_US, home directory:<span style="color: #7a0874; font-weight: bold;">alias</span> Macintosh HD:Users:aoi:, boot volume:Macintosh HD, computer name:macmeta, host name:macmeta.tc.ph.cox.net, IPv4 address:192.168.11.119, primary Ethernet address:<span style="color: #000000;">40</span>:6c:8f:0d:<span style="color: #000000;">48</span>:a6, CPU <span style="color: #7a0874; font-weight: bold;">type</span>:Intel <span style="color: #000000;">80486</span>, CPU speed:<span style="color: #000000;">2300</span>, physical memory:<span style="color: #000000;">2048</span></pre>
</div>
</div>
<p>As you can see, it brings back a ton of info, including the system version.</p>
<p>Know of any other ways to find the system version and build numbers of OS X? Let me know in the comments.
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/3GTBUreHIcY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/05/02/finding-os-x-version-and-build-information-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/05/02/finding-os-x-version-and-build-information-from-the-command-line/</feedburner:origLink></item>
		<item>
		<title>What version of EFI is my Mac OS X Computer Running?</title>
		<link>http://feedproxy.google.com/~r/TheNubbyAdmin/~3/_GL1u3l4ufU/</link>
		<comments>http://thenubbyadmin.com/2012/04/30/what-version-of-efi-is-my-mac-os-x-computer-running/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 13:47:17 +0000</pubDate>
		<dc:creator>Wesley David</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://thenubbyadmin.com/?p=2532</guid>
		<description><![CDATA[There comes a time when it is expedient to know some version information about the EFI firmware running on Apple OS X. In my case, I just wanted to make sure that I had EFI64. I knew I did, but&#8230; seeing is believing.<br />
As of OS X 10.7.3, to find out information concerning what version of Apple&#8217;s EFI firmware you are running, perform the following command at a terminal:<br />
<br />
<br />
ioreg -p IODeviceTree -b -n efi &#124; grep efi ...]]></description>
			<content:encoded><![CDATA[<p>There comes a time when it is expedient to know some version information about the EFI firmware running on Apple OS X. In my case, I just wanted to make sure that I had EFI64. I knew I did, but&#8230; seeing is believing.</p>
<p>As of OS X 10.7.3, to find out information concerning what version of Apple&#8217;s EFI firmware you are running, perform the following command at a terminal:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">ioreg <span style="color: #660033;">-p</span> IODeviceTree <span style="color: #660033;">-b</span> <span style="color: #660033;">-n</span> efi <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> efi <span style="color: #660033;">-C</span> <span style="color: #000000;">4</span></pre>
</div>
</div>
<p>In my case, the output is as follows:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">+-o Root  <span style="color: #000000; font-weight: bold;">&lt;</span>class IORegistryEntry, <span style="color: #c20cb9; font-weight: bold;">id</span> 0x100000100, retain <span style="color: #000000;">10</span><span style="color: #000000; font-weight: bold;">&gt;</span>
  +-o <span style="color: #000000; font-weight: bold;">/</span>  <span style="color: #000000; font-weight: bold;">&lt;</span>class IOPlatformExpertDevice, <span style="color: #c20cb9; font-weight: bold;">id</span> 0x100000110, registered, matched, active, busy <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">15221</span> ms<span style="color: #7a0874; font-weight: bold;">&#41;</span>, retain <span style="color: #000000;">37</span><span style="color: #000000; font-weight: bold;">&gt;</span>
    +-o chosen  <span style="color: #000000; font-weight: bold;">&lt;</span>class IOService, <span style="color: #c20cb9; font-weight: bold;">id</span> 0x100000101, <span style="color: #000000; font-weight: bold;">!</span>registered, <span style="color: #000000; font-weight: bold;">!</span>matched, active, busy <span style="color: #000000;">0</span>, retain <span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&gt;</span>
    <span style="color: #000000; font-weight: bold;">|</span> +-o memory-map  <span style="color: #000000; font-weight: bold;">&lt;</span>class IOService, <span style="color: #c20cb9; font-weight: bold;">id</span> 0x100000102, <span style="color: #000000; font-weight: bold;">!</span>registered, <span style="color: #000000; font-weight: bold;">!</span>matched, active, busy <span style="color: #000000;">0</span>, retain <span style="color: #000000;">6</span><span style="color: #000000; font-weight: bold;">&gt;</span>
    +-o efi  <span style="color: #000000; font-weight: bold;">&lt;</span>class IOService, <span style="color: #c20cb9; font-weight: bold;">id</span> 0x100000103, <span style="color: #000000; font-weight: bold;">!</span>registered, <span style="color: #000000; font-weight: bold;">!</span>matched, active, busy <span style="color: #000000;">0</span>, retain <span style="color: #000000;">8</span><span style="color: #000000; font-weight: bold;">&gt;</span>
    <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #ff0000;">&quot;firmware-revision&quot;</span> = <span style="color: #000000; font-weight: bold;">&lt;</span>0a000100<span style="color: #000000; font-weight: bold;">&gt;</span>
    <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #ff0000;">&quot;device-properties&quot;</span> = <span style="color: #000000; font-weight: bold;">&lt;</span>fe04000001000000040000000e0200000500000002010c00d041030a000000000101060000027fff04001e00000073006100760065006400$
    <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #ff0000;">&quot;firmware-abi&quot;</span> = <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #ff0000;">&quot;EFI64&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
    <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #ff0000;">&quot;name&quot;</span> = <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #ff0000;">&quot;efi&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
    <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">|</span>   <span style="color: #ff0000;">&quot;firmware-vendor&quot;</span> = <span style="color: #000000; font-weight: bold;">&lt;</span>4100700070006c0065000000<span style="color: #000000; font-weight: bold;">&gt;</span>
    <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">|</span>
    <span style="color: #000000; font-weight: bold;">|</span> +-o kernel-compatibility  <span style="color: #000000; font-weight: bold;">&lt;</span>class IOService, <span style="color: #c20cb9; font-weight: bold;">id</span> 0x100000104, <span style="color: #000000; font-weight: bold;">!</span>registered, <span style="color: #000000; font-weight: bold;">!</span>matched, active, busy <span style="color: #000000;">0</span>, retain <span style="color: #000000;">4</span><span style="color: #000000; font-weight: bold;">&gt;</span></pre>
</div>
</div>
<p>And the text that I&#8217;m most interested in is &#8220;firmware-abi&#8221; = &lt;&#8221;EFI64&#8243;&gt;</p>
<p>To explain the above, ioreg is used to query the <a href="http://developer.apple.com/library/mac/#documentation/DeviceDrivers/Conceptual/IOKitFundamentals/TheRegistry/TheRegistry.html">Apple I/O registry</a>. We then need to select the Device Tree plane and do so with -p IODeviceTree. -b is just a nicety to put the object name in bold letters. -n scopes the query down to only those things that have a certain name in them. In our case, we want the name of &#8220;efi&#8221;.</p>
<p>We then pipe the whole mess to grep where we search for the word &#8220;efi&#8221; and then, with -C, give four lines of context above and below each mention of the word &#8220;efi&#8221;.</p>
<p>Simple!
<div style='clear:both'></div>
<img src="http://feeds.feedburner.com/~r/TheNubbyAdmin/~4/_GL1u3l4ufU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://thenubbyadmin.com/2012/04/30/what-version-of-efi-is-my-mac-os-x-computer-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thenubbyadmin.com/2012/04/30/what-version-of-efi-is-my-mac-os-x-computer-running/</feedburner:origLink></item>
	</channel>
</rss>

