<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>9thport &#187; Sysadmin</title>
	<atom:link href="http://9thport.net/archives/category/sysadmin/feed" rel="self" type="application/rss+xml" />
	<link>http://9thport.net</link>
	<description>organization, programming, photography, technical news I find interesting</description>
	<lastBuildDate>Fri, 10 Sep 2010 05:22:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>My favorite Trac-Hacks</title>
		<link>http://9thport.net/archives/933</link>
		<comments>http://9thport.net/archives/933#comments</comments>
		<pubDate>Thu, 22 Jul 2010 16:04:34 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=933</guid>
		<description><![CDATA[<br/>Here is a list of my favorite Trac-Hacks: Advanced Ticket Workflow Extends the list of operations for the ticket workflow Batch Motify Modify many tickets from a report Flexible Assign To Custom list of contacts built from a python file Ini Admin Graphical interface to the trac.ini file Ticket Guidelines Include a wiki page at [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Here is a list of my favorite Trac-Hacks:</p>
<ul>
<li>Advanced Ticket Workflow
<ul>
<li>Extends the list of operations for the ticket workflow</li>
</ul>
</li>
<li>Batch Motify
<ul>
<li>Modify many tickets from a report</li>
</ul>
</li>
<li>Flexible Assign To
<ul>
<li>Custom list of contacts built from a python file</li>
</ul>
</li>
<li>Ini Admin
<ul>
<li>Graphical interface to the trac.ini file</li>
</ul>
</li>
<li>Ticket Guidelines
<ul>
<li>Include a wiki page at the top of the new ticket page for passing information to all users</li>
</ul>
</li>
<li>Trac Custom Field Admin
<ul>
<li>Interface for adding or removing custom fields to the ticket form</li>
</ul>
</li>
<li>Trac Date Field
<ul>
<li>jQuery based date picker with lots of options in the Ini Admin</li>
</ul>
</li>
<li>Trac Drag Drop
<ul>
<li>When using FireFox, dropping files onto the webpage displaying a ticket will process each file and have it attached to the ticket</li>
</ul>
</li>
<li>Trac Keyword Suggest
<ul>
<li>Automatic drop down of the keywords with option to have limits placed</li>
</ul>
</li>
<li>Trac Private Tickets
<ul>
<li>Extends the permissions module to limit users of viewing tickets</li>
</ul>
</li>
<li>Trac Theme Engine
<ul>
<li>Allows for using various themes or making your own</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/933/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebTrends UI logging to monitor user activity</title>
		<link>http://9thport.net/archives/931</link>
		<comments>http://9thport.net/archives/931#comments</comments>
		<pubDate>Thu, 22 Jul 2010 15:54:44 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=931</guid>
		<description><![CDATA[<br/>WebTrends Analytics 8.x is a Windows based log analyzer to produce graphs and reports of your website traffic. As your users are generating reports, it is helpful to find out what they are doing. Here is how you can accomplish this task: Goto 'System Managment -&#62; Role Settings' Click on UI Server Enable 'Use local [...]]]></description>
			<content:encoded><![CDATA[<br/><p>WebTrends Analytics 8.x is a Windows based log analyzer to produce graphs and reports of your website traffic. As your users are generating reports, it is helpful to find out what they are doing. Here is how you can accomplish this task:</p>
<ol>
<li>Goto 'System Managment -&gt; Role Settings'</li>
<li>Click on UI Server</li>
<li>Enable 'Use local settings'</li>
<li>Place a checkbox in 'Enable Tomcat logging'</li>
<li>The log files are located in: 'c:\Program Files\WebTrends\common\jakarta-tomcat\logs\tomcat*.log</li>
</ol>
<p>To modify the tomcat logging settings:</p>
<ul>
<li>c:\Program Files\WebTrends\common\jakarta-tomcat\conf\server.xml</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/931/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying the Trac email notification file to show a custom date format</title>
		<link>http://9thport.net/archives/921</link>
		<comments>http://9thport.net/archives/921#comments</comments>
		<pubDate>Tue, 20 Jul 2010 23:53:32 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=921</guid>
		<description><![CDATA[<br/>I really like the Trac project management software. Recently I have been using it very much and customizing it to fit my needs at work. In regards with the notification system, I found that the default format was not acceptable and a custom one was desired. I added the following code to the file "/usr/lib/python2.4/site-packages/trac/ticket/templates/ticket_notify_email.txt" [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I really like the <a href="http://trac.edgewall.org/">Trac</a> project management software. Recently I have been using it very much and customizing it to fit my needs at work. In regards with the notification system, I found that the default format was not acceptable and a custom one was desired. I added the following code to the file "/usr/lib/python2.4/site-packages/trac/ticket/templates/ticket_notify_email.txt" to have a nice date in the template:</p>
<pre>{% python

    from genshi.builder import tag
    from trac.util.datefmt import format_datetime
    import time

    def custom_time(value):
        return format_datetime(t=value, format='%H:%M:%S', tzinfo=PST)

%}

${custom_time(ticket.time)}</pre>
<p>My entire file looks like the following:</p>
<pre>{% python

    from genshi.builder import tag
    from trac.util.datefmt import format_datetime
    import time

    def custom_time(value):
	return format_datetime(t=value, format='%Y-%m-%d %H:%M:%S', tzinfo=PST)

%}
{% choose ticket.new %}\
{%   when True %}\
On ${custom_time(ticket.time)} PST, a ticket with the summary of '$ticket.summary' was created by '$ticket.reporter' and assigned to $ticket.owner .
{%   end %}\
{%   otherwise %}\
{%     if changes_body %}\
${_('Changes (by %(author)s):', author=change.author)}

$changes_body
{%     end %}\
{%     if changes_descr %}\
{%       if not changes_body and not change.comment and change.author %}\
${_('Description changed by %(author)s:', author=change.author)}
{%       end %}\
$changes_descr
--
{%     end %}\
{%     if change.comment %}\

${changes_body and _('Comment:') or _('Comment (by %(author)s):', author=change.author)}

$change.comment
{%     end %}\
{%   end %}\
{% end %}\

--
${_('Ticket URL: &lt;%(link)s&gt;', link=ticket.link)}
$project.name &lt;${project.url or abs_href()}&gt;
$project.descr</pre>
<p></em></p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/921/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tar and Gzip</title>
		<link>http://9thport.net/archives/877</link>
		<comments>http://9thport.net/archives/877#comments</comments>
		<pubDate>Wed, 12 May 2010 15:39:48 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=877</guid>
		<description><![CDATA[<br/>Tar tar cvf backup.tar /etc Gzip gzip -9 backup.tar Tar and Gzip together tar cvf - /etc gzip -9c &#62; backup.tar.gz To untar tar xvf backup.tar To ungzip gunzip backup.tar.gz To Untar and Ungzip gunzip -c backup.tar.gz  &#124; tar xvf - To list contents of a tar.gz file tar -ztvf file.tar.gz To list contents of a [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Tar</p>
<p><span style="font-family: terminal, monaco;">tar cvf backup.tar /etc</span></p>
<h3>Gzip</h3>
<p>gzip -9 backup.tar</p>
<h3>Tar and Gzip together</h3>
<p>tar cvf - /etc  gzip -9c &gt; backup.tar.gz</p>
<h3>To untar</h3>
<p>tar xvf backup.tar</p>
<h3>To ungzip</h3>
<p>gunzip backup.tar.gz</p>
<h3>To Untar and Ungzip</h3>
<p>gunzip -c backup.tar.gz  | tar xvf -</p>
<h3>To list contents of a tar.gz file</h3>
<p>tar -ztvf file.tar.gz</p>
<h3>To list contents of a zip file</h3>
<p>unzip -l [filename].zip</p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/877/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install ruby gems behind a proxy server</title>
		<link>http://9thport.net/archives/863</link>
		<comments>http://9thport.net/archives/863#comments</comments>
		<pubDate>Thu, 29 Apr 2010 21:34:22 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=863</guid>
		<description><![CDATA[<br/>I am not going to say too much about how to do this, but just provide an example of what you need to type in: /opt/local/bin/gem install GEMNAME --http-proxy="http://proxy.server.com:80" -V]]></description>
			<content:encoded><![CDATA[<br/><p>I am not going to say too much about how to do this, but just provide an example of what you need to type in:</p>
<p>/opt/local/bin/gem install GEMNAME --http-proxy="http://proxy.server.com:80" -V</p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/863/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>change maximum memory for coldfusion 8</title>
		<link>http://9thport.net/archives/718</link>
		<comments>http://9thport.net/archives/718#comments</comments>
		<pubDate>Mon, 01 Mar 2010 16:03:47 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://9thport.net/archives/718</guid>
		<description><![CDATA[<br/>First, it might be good for you to get the total amount of free memory on your system (using -m will present the information in MB): [root@www1 bin]# free -m total       used       free     shared    buffers     cached Mem:          1770     [...]]]></description>
			<content:encoded><![CDATA[<br/><p>First, it might be good for you to get the total amount of free memory on your system (using -m will present the information in MB):</p>
<pre><span style="font-size: x-small;">[root@www1 bin]# free -m
total       used       free     shared    buffers     cached
Mem:          1770       1754         15          0         74        894
-/+ buffers/cache:        785        984
Swap:         1983         74       1909</span><span style="font-size: x-small;">
</span></pre>
<pre><span style="font-size: x-small;">Lo</span>oks like I have about 1754 MB free.</pre>
<p>Edit the following file:</p>
<p><span style="font-family: terminal, monaco;">/opt/jrun4/bin/jvm.config</span></p>
<p>then change the following line from:</p>
<p><span style="font-family: terminal, monaco;">-XX:MaxPermSize=512m</span></p>
<p>to something higher, like:</p>
<p><span style="font-family: terminal, monaco;">-XX:MaxPermSize=768m</span></p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/718/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When starting Dreamweaver CS4 I get an error of microsoft visual c++ runtime library: runtime error</title>
		<link>http://9thport.net/archives/704</link>
		<comments>http://9thport.net/archives/704#comments</comments>
		<pubDate>Mon, 22 Feb 2010 18:25:46 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=704</guid>
		<description><![CDATA[<br/>Today I got an error message of "microsoft visual c++ runtime library: runtime error ..." when attempting to run Adobe Dreamweaver CS4. This is horrible!! Here is a screen show showing what I got: My method for fixing this error on Windows XP was to do move the following directory into my Recycle Bin: c:\Documents [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Today I got an error message of "microsoft visual c++ runtime library: runtime error ..." when attempting to run Adobe Dreamweaver CS4. This is horrible!! Here is a screen show showing what I got:</p>
<div id="attachment_705" class="wp-caption aligncenter" style="width: 310px"><a href="http://9thport.net/wp-content/uploads/2010/02/dreamweaver-cs4-windows-error.png"><img class="size-medium wp-image-705 " title="dreamweaver cs4 windows error" src="http://9thport.net/wp-content/uploads/2010/02/dreamweaver-cs4-windows-error-300x144.png" alt="dreamweaver cs4 windows error" width="300" height="144" /></a><p class="wp-caption-text">my dreamweaver cs4 windows error</p></div>
<p>My method for fixing this error on Windows XP was to do move the following directory into my Recycle Bin:</p>
<ul>
<li>c:\Documents and Settings\[username]\Application Data\Adobe\Dreamweaver CS4</li>
</ul>
<p>Note: The "Application Data" folder is hidden and you might need to do the following:</p>
<ol>
<li>Choose menu "Tools"</li>
<li>Choose menu item "Folder Options"</li>
<li>Choose tab "View"</li>
<li>Enable "Show hidden files and folders"</li>
<li>Click "OK"</li>
</ol>
<p>After removing the directory, launching Dreamweaver worked! I was also surprised that I did not loose any of my site settings.</p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/704/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>bash script template to be used for parsing arguments to make your shell programming life easier</title>
		<link>http://9thport.net/archives/701</link>
		<comments>http://9thport.net/archives/701#comments</comments>
		<pubDate>Fri, 12 Feb 2010 20:24:56 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=701</guid>
		<description><![CDATA[<br/>I found that all my bash scripts really bennifet with the following template because: it handles options with possible responses of needs debugging with a flag help description of the script This template keeps proving to be enough to start my script building. There is really nothing more to say about this so here is [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I found that all my bash scripts really bennifet with the following template because:</p>
<ol>
<li>it handles options with possible responses of needs</li>
<li>debugging with a flag</li>
<li>help description of the script</li>
</ol>
<p>This template keeps proving to be enough to start my script building. There is really nothing more to say about this so here is my template:</p>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">#!/usr/bin/env bash</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># created at: Wed Apr 04 10:03:41 PDT 2009</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># updated at: Wed Apr 22 15:33:24 PDT 2009</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># author: aaron addleman</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># manage subversion with swatch and ftp log file. all actions will be sent to a file for throttling purposes to allow SVN to handle its own lock files</span></div>
<div id="_mcePaste"></div>
<div># <span style="font-family: terminal, monaco;">BEGIN SCRIPT</span></div>
<div><span style="font-family: terminal, monaco;">usage()</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat &lt;&lt; EOF</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">usage: $0 options</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">This script takes commands from a swatch and converts to svn commands for a directory under version control.</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">OPTIONS:</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">-h      Show this message</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">-a	   Action needed (STOR, DELE, MKD, ENTRIES, SVNUPDATE)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">-u      Username to use for commits</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">-f      File or directory being affected</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">-m      message to use</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">-x      Execute SVN commands from the $SVNACTIONS file</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">(when this option is used, all others are ignored)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">-v      Verbose (boolean)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">-t      Test (dont run any commands, but print them to the command line)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">EOF</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">ACTION=</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">USER=</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">FILE=</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">MESSAGE=</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">VERBOSE=</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">TEST=</span></div>
<div id="_mcePaste"></div>
<div><span style="font-family: terminal, monaco;">while getopts "h a:u:f:m:x:v:t" OPTION</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">do</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">case $OPTION in</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">h)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">usage</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">exit 1</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">;;</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">a)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">ACTION=$OPTARG</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">;;</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">u)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">USER=$OPTARG</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">;;</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">f)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">FILE=$OPTARG</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">;;</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">m)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">MESSAGE=$OPTARG</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">;;</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">v)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">VERBOSE=1</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">;;</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">t)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">TEST=1</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">;;</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">?)</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">usage</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">exit</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">;;</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">esac</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">done</span></div>
<div id="_mcePaste"></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/701/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Ubuntu now&#8230;</title>
		<link>http://9thport.net/archives/694</link>
		<comments>http://9thport.net/archives/694#comments</comments>
		<pubDate>Fri, 05 Feb 2010 03:05:59 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=694</guid>
		<description><![CDATA[<br/>I really like the Ubuntu operating system and the team that is making it. I hope to make it my personal development computer once I find a nice laptop to run it on.]]></description>
			<content:encoded><![CDATA[<br/><p>I really like the Ubuntu operating system and the team that is making it. I hope to make it my personal development computer once I find a nice laptop to run it on.</p>
<div id="attachment_695" class="wp-caption alignleft" style="width: 538px"><a href="http://9thport.net/wp-content/uploads/2010/02/Ubuntu-Install-Screen-shot-2010-02-04-at-7.01.04-PM.png"><img class="size-full wp-image-695 " title="Ubuntu Install Screen shot 2010-02-04 at 7.01.04 PM" src="http://9thport.net/wp-content/uploads/2010/02/Ubuntu-Install-Screen-shot-2010-02-04-at-7.01.04-PM.png" alt="Installing Ubunto 9.10 on VMWare" width="528" height="467" /></a><p class="wp-caption-text">Installing Ubunto 9.10 on VMWare</p></div>
<div id="attachment_698" class="wp-caption alignleft" style="width: 672px"><a href="http://9thport.net/wp-content/uploads/2010/02/Full-Screen-Terminal-Screen-shot-2010-02-04-at-7.31.42-PM1.png"><img class="size-full wp-image-698 " title="Full Screen Terminal Screen shot 2010-02-04 at 7.31.42 PM" src="http://9thport.net/wp-content/uploads/2010/02/Full-Screen-Terminal-Screen-shot-2010-02-04-at-7.31.42-PM1.png" alt="Full Screen Terminal Screen shot in Ubuntu while installing Ruby on Rails" width="662" height="568" /></a><p class="wp-caption-text">Full Screen Terminal Screen shot in Ubuntu while installing Ruby on Rails</p></div>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/694/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RedHat Linux ACL report bash shell script</title>
		<link>http://9thport.net/archives/685</link>
		<comments>http://9thport.net/archives/685#comments</comments>
		<pubDate>Thu, 04 Feb 2010 07:12:58 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=685</guid>
		<description><![CDATA[<br/>Finally the day has arrived where I had to make a script to build an report for the access control list attributes on all of the files on my web server. I decided to use bash because it was easy for me to do and for compatibility of future releases of RedHat. I would have [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Finally the day has arrived where I had to make a script to build an report for the access control list attributes on all of the files on my web server. I decided to use bash because it was easy for me to do and for compatibility of future releases of RedHat. I would have much rather have done it in Python or Ruby, but ohwell. By no means is this script really complete. I have to admit that it needs better testing of the input arguments and the debugging messages are pretty bad. I wrote this script in under 1 hour. I will do better as time proceeds, but for now, it got the job done.</p>
<p>My script does the following:</p>
<ol>
<li>takes two arguments
<ol>
<li>the path to start looking for directories</li>
<li>the file name for the report</li>
</ol>
</li>
<li>builds a header with date and time of report</li>
<li>finds the users and groups and counts the amount of times they appear in the report for a summary</li>
<li>appends the full report of all the files with the ACL</li>
</ol>
<p>Ideas for the next version:</p>
<ol>
<li>Prompting of cleaning up world writable files</li>
<li>Storing ACL for each file into a database for tracking history</li>
<li>Do you have any ideas? If so, please let me know and maybe I will add them to the next version.</li>
</ol>
<ol></ol>
<p>And now, here is the script:</p>
<p>(for anyone who wishes to <a href="http://9thport.net/wp-content/uploads/2010/02/gen_acl_report.sh.zip">gen_acl_report.sh</a>)</p>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">#!/bin/bash</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div><span style="font-family: terminal, monaco;"># purpose: create ACL report on 1 level depth directories and output to text file report</span></div>
<div><span style="font-family: terminal, monaco;"># usage: ./gen_acl_report.sh start_path report</span></div>
<div><span style="font-family: terminal, monaco;"># the above command will generate a file called "report_20100203_YYYYMMDD_HHMMSS.txt"</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div><span style="font-family: terminal, monaco;"># created by: aaron</span></div>
<div><span style="font-family: terminal, monaco;"># created at: 20100203</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div><span style="font-family: terminal, monaco;"># debug flag</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG="on"</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># debug function</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function DEBUG()</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">[ "$DEBUG" == "on" ] &amp;&amp; $@ || :</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># set path to find files</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">STARTPATH="$1"</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># set report output</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">REPORT="$2_`date +%Y%m_%H%M%S`.txt"</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># set temp report file</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">ACLFILELIST=/tmp/acl_file_list.txt</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "REPORT is = $REPORT"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "ACLFILELIST is = $ACLFILELIST"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "STARTPATH is = $STARTPATH"</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># build acl list</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function reportHeader</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...inside function reportHeader"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "ACL REPORT" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Started on `date`" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...end of function reportHeader"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function getACL</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...inside function getACL"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># find all files excluding .svn</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">#find $STARTPATH -path '*.svn' -prune -o -type f -exec getfacl {} \; &gt; $ACLFILELIST</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"># find all top level directories</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "executing find $1"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">find $STARTPATH -maxdepth 1 -path '*\.svn' -prune -o -type d -exec getfacl {} \; &gt; $ACLFILELIST</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...end of function getACL"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function groupsSummary</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...inside function groupsSummary"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Group Summary:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep "^group:[a-zA-Z]" | sort | uniq -c &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Default Group Summary:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep "^default:group:[a-zA-Z]" | sort | uniq -c &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Users for each group:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">for a in `cat $ACLFILELIST | grep "^group:[a-zA-Z]" | sort | awk -F: '{print $2}' | uniq`</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">do</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo $a &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">for g in `cat /etc/group | grep $a`</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">do</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo $g | awk -F: '{print "\t"$4}' &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">done</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">done</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Users for each default group:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">for a in `cat $ACLFILELIST | grep "^default:group:[a-zA-Z]" | sort | awk -F: '{print $3}' | uniq`</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">do</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo $a &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">for g in `cat /etc/group | grep $a`</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">do</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo $g | awk -F: '{print "\t"$4}' &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">done</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">done</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...end of function groupsSummary"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function usersSummary</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...inside function usersSummary"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "User Summary:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep "^user:" | sort | uniq -c &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Default User Summary:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep "^default:user:" | sort | uniq -c &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...end of function usersSummary"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function maskSummary</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...inside function maskSummary"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Mask Summary:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep "^mask:" | sort | uniq -c &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Default Mask Summary:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep "^default:mask:" | sort | uniq -c &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...end of function maskSummary"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function findGroups</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...finding list of groups"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep group:</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function otherSummary</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...inside function otherSummary"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Other Summary:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep "^other:" | sort | uniq -c &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "Default Other Summary:" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep "^default:other:" | sort | uniq -c &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo " " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...end of function otherSummary"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function listofFiles</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...list of files"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "List of files" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST | grep "# file: " &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...end of list of files"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function appendACL</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...appending acl contents"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "ACL list of files" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">cat $ACLFILELIST &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">echo "===================================" &gt;&gt; $REPORT</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...end of acl contents appending"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">function removeACL</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">{</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...removing temp files for ACL"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">rm $ACLFILELIST</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">DEBUG echo "...removing temp files for ACL done"</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">}</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">reportHeader</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">getACL</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">groupsSummary</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">usersSummary</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">maskSummary</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">otherSummary</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">listofFiles</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">appendACL</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">findGroups</span></div>
<div><span style="font-family: terminal, monaco;"><br />
</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;">removeACL</span></div>
<div id="_mcePaste"><span style="font-family: terminal, monaco;"><br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/archives/685/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
