<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">

  <channel rdf:about="http://www.megalomaniacal.net/">
    <title>Megalomaniacal</title>
    <link>http://www.megalomaniacal.net/</link>
    <description>Better than the best and harder than the rest.</description>
    <items>
      <rdf:Seq>
        
        <rdf:li resource="http://www.megalomaniacal.net/2008/07/14/1216070794992.html" />
        
        <rdf:li resource="http://www.megalomaniacal.net/2007/12/12/1197515067834.html" />
        
        <rdf:li resource="http://www.megalomaniacal.net/2007/10/16/1192570674686.html" />
        
      </rdf:Seq>
    </items>
  </channel>

  
  <item rdf:about="http://www.megalomaniacal.net/2008/07/14/1216070794992.html">
    <title>Gaining root privileges on a FreeBSD server if root&#039;s shell is inaccessible</title>
    <link>http://www.megalomaniacal.net/2008/07/14/1216070794992.html</link>
    
      
        <description>
          &lt;p&gt;
Usually I would never see this, but my line of work requires that I suspend disbelief.&lt;br&gt;
&lt;br&gt;
Scooter user has a FreeBSD server and is &#034;doing maintenance&#034;.  Later I discover they&#039;re upgrading from 6.2 to 7.0.  Usually this isn&#039;t an issue, but they went and changed root&#039;s shell to /usr/local/bin/bash.  Now, anyone who knows anything about upgrading FreeBSD knows what happens between major versions.  Libraries change versions, applications break.  Not a pretty sight.&lt;br&gt;
&lt;br&gt;
I, being the only FreeBSD admin on the floor at the time with some seasoning, am blessed with the task of cleaning up behind this genius after a couple of other people can&#039;t get root.  Meanwhile, Scooter has the nerve to start screaming &#034;NOW NOW NOW ASAP OMG BROKED!!!!1!1!!OEN&#034;&lt;br&gt;
&lt;br&gt;
Since I have never had to deal with this before, the su(1) had the answer I required.  It was, however, not readily apparent that it was the answer.  After some twiddling, I was able to get in by using &#039;su -m&#039; and saved the day.  Now all I need to do is take the time to write up some &#034;best practices&#034; stuff to teach folks.
&lt;/p&gt;
        </description>
      
      
    
  </item>
  
  <item rdf:about="http://www.megalomaniacal.net/2007/12/12/1197515067834.html">
    <title>Tomcat on Plesk in the DocumentRoot</title>
    <link>http://www.megalomaniacal.net/2007/12/12/1197515067834.html</link>
    
      
        <description>
          &lt;pre wrap=&#034;&#034;&gt;Needs refining, but here&#039;s the quick &#039;n nasty:&lt;br /&gt;&lt;br /&gt;- Enable Tomcat within Plesk for the domain.&lt;br /&gt;&lt;br /&gt;- Modify the Context for the domain within /etc/tomcat5/server.xml to&lt;br /&gt;reflect the following:&lt;br /&gt;&lt;br /&gt;	&amp;lt;Context crossContext=&amp;quot;false&amp;quot; reloadable=&amp;quot;false&amp;quot; useNaming=&amp;quot;true&amp;quot;&lt;br /&gt;debug=&amp;quot;0&amp;quot; swallowOutput=&amp;quot;false&amp;quot; privileged=&amp;quot;true&amp;quot; displayName=&amp;quot;domain&lt;br /&gt;name&amp;quot; docBase=&amp;quot;/var/www/vhosts/domain.com/httpdocs&amp;quot; COOKIEs=&amp;quot;true&amp;quot;&lt;br /&gt;path=&amp;quot;&amp;quot; cachingAllowed=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Add a vhost.conf to the domain laying down some defaults:&lt;br /&gt;&lt;br /&gt;[136914-www1 21:57:04]-(~)# cat&lt;br /&gt;/var/www/vhosts/domain.com/conf/vhost.conf&lt;br /&gt;DocumentRoot /var/www/vhosts/domain.com/httpdocs&lt;br /&gt;&lt;br /&gt;&amp;lt;Directory &amp;quot;/var/www/vhosts/domain.com/httpdocs&amp;quot;&amp;gt;&lt;br /&gt;Options Indexes FollowSymLinks&lt;br /&gt;DirectoryIndex index.jsp index.html index.htm&lt;br /&gt;&amp;lt;/Directory&amp;gt;&lt;br /&gt;&lt;br /&gt;JkMount &lt;em class=&#034;moz-txt-slash&#034;&gt;&lt;span class=&#034;moz-txt-tag&#034;&gt;/&lt;/span&gt;servlet&lt;span class=&#034;moz-txt-tag&#034;&gt;/&lt;/span&gt;&lt;/em&gt;* ajp13&lt;br /&gt;JkMount /*.jsp ajp13&lt;br /&gt;&lt;br /&gt;&amp;lt;Location &amp;quot;&lt;em class=&#034;moz-txt-slash&#034;&gt;&lt;span class=&#034;moz-txt-tag&#034;&gt;/&lt;/span&gt;WEB-INF&lt;span class=&#034;moz-txt-tag&#034;&gt;/&lt;/span&gt;&lt;/em&gt;*&amp;quot;&amp;gt;&lt;br /&gt;AllowOverride None&lt;br /&gt;deny from all&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt;&amp;lt;Location &amp;quot;&lt;em class=&#034;moz-txt-slash&#034;&gt;&lt;span class=&#034;moz-txt-tag&#034;&gt;/&lt;/span&gt;META-INF&lt;span class=&#034;moz-txt-tag&#034;&gt;/&lt;/span&gt;&lt;/em&gt;*&amp;quot;&amp;gt;&lt;br /&gt;AllowOverride None&lt;br /&gt;deny from all&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Run websrvmng, bounce Apache, then hit up a JSP file in the document root.&lt;/pre&gt;
        </description>
      
      
    
  </item>
  
  <item rdf:about="http://www.megalomaniacal.net/2007/10/16/1192570674686.html">
    <title>SCSI bus rescan</title>
    <link>http://www.megalomaniacal.net/2007/10/16/1192570674686.html</link>
    
      
        <description>
          Here&#039;s a good one that I had to deal with recently.&amp;nbsp; Two drives being removed and one going in its place.&amp;nbsp; The kicker is that they wanted zero downtime.&amp;nbsp; Cool, except there&#039;s no RAID and it&#039;s just a bunch of drives in the box.&amp;nbsp; Here&#039;s what I wound up following in order to re-read the new drive and flush out the old data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
################### TO REMOVE DRIVE&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;scsi remove-single-device 0 1 2 3&amp;quot; &amp;gt; /proc/scsi/scsi&lt;br /&gt;
(replace &amp;quot;0 1 2 3&amp;quot; with your &amp;quot;Host Channel Id Lun&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
-- for us:&lt;br /&gt;
(SU-recover1)/var/log&amp;gt;cat /proc/scsi/scsi&lt;br /&gt;
Attached devices:&lt;br /&gt;
Host: scsi0 Channel: 00 Id: 00 Lun: 00&lt;br /&gt;
Vendor: FUJITSU Model: MAS3184NC Rev: 5B08&lt;br /&gt;
Type: Direct-Access ANSI SCSI revision: 03&lt;br /&gt;
Host: scsi0 Channel: 00 Id: 03 Lun: 00&lt;br /&gt;
Vendor: SEAGATE Model: ST336753LC Rev: 0006&lt;br /&gt;
Type: Direct-Access ANSI SCSI revision: 03&lt;br /&gt;
Host: scsi0 Channel: 00 Id: 05 Lun: 00&lt;br /&gt;
Vendor: SEAGATE Model: ST336753LC Rev: 0006&lt;br /&gt;
Type: Direct-Access ANSI SCSI revision: 03&lt;br /&gt;
Host: scsi0 Channel: 00 Id: 06 Lun: 00&lt;br /&gt;
Vendor: PE/PV Model: 1x6 SCSI BP Rev: 1.1&lt;br /&gt;
Type: Processor ANSI SCSI revision: 02&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--- want to remove the first seagate, after disabling in slot&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;scsi remove-single-device 0 0 3 0&amp;quot; &amp;gt; /proc/scsi/scsi&lt;br /&gt;
&lt;br /&gt;
############## TO RESTART&lt;br /&gt;
After you replace the drive and restart it&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;scsi add-single-device 0 1 2 3&amp;quot; &amp;gt; /proc/scsi/scsi&lt;br /&gt;
&lt;br /&gt;
It&#039;s rather straightforward for the technically minded folks.&amp;nbsp; Shame it requires echoing crap to /proc, since there be dragons in /proc
        </description>
      
      
    
  </item>
  

</rdf:RDF>
