<?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>zazzybob.com</title>
	<atom:link href="http://www.zazzybob.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.zazzybob.com</link>
	<description>UNIX and Linux</description>
	<lastBuildDate>Sun, 06 Dec 2009 10:02:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Selective root shells</title>
		<link>http://www.zazzybob.com/?p=100</link>
		<comments>http://www.zazzybob.com/?p=100#comments</comments>
		<pubDate>Sun, 06 Dec 2009 10:02:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Shells]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=100</guid>
		<description><![CDATA[On my work systems, the root account can be accessed by three system administrators, including myself. I like zsh (for interactive use) and bash for scripting. The other admins do not share my interest in zsh. So, I place a small piece of code such as the following in root@&#60;host&#62;:~/.bashrc

if [ $( /usr/bin/who am i [...]]]></description>
			<content:encoded><![CDATA[<p>On my work systems, the root account can be accessed by three system administrators, including myself. I like zsh (for interactive use) and bash for scripting. The other admins do not share my interest in zsh. So, I place a small piece of code such as the following in <tt>root@&lt;host&gt;:~/.bashrc</tt></p>
<pre>
if [ $( /usr/bin/who am i | /bin/awk '{print $1}' ) = "kevin" ]; then
    [[ ! -L ~/.zshrc ]] &amp;&amp; /bin/ln -s ~kevin/.zshrc ~/.zshrc
    exec /usr/local/bin/zsh -l
fi
</pre>
<p>Then, in <tt>root@&lt;host&gt;:~/.zlogout</tt>, I add the following:</p>
<pre>
if [ $( /usr/bin/who am i | /bin/awk '{print $1}' ) = "kevin" ]; then
    [[ -L ~/.zshrc ]] &amp;&amp; {
        echo "removing .zshrc"
        /bin/rm -f ~/.zshrc
    }
fi
</pre>
<p>This enables me to enjoy zsh, without upsetting anyone else. I have root-specific code in my <tt>.zshrc</tt> to tailor the environment to my liking. It has the added benefit of not affecting console logins (unless I log in as myself from the console, and then <tt>su -</tt> to root).</p>
<p>Cheers,<br />
Kevin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=100</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started with Solaris Containers</title>
		<link>http://www.zazzybob.com/?p=98</link>
		<comments>http://www.zazzybob.com/?p=98#comments</comments>
		<pubDate>Mon, 09 Nov 2009 00:31:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Zones]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=98</guid>
		<description><![CDATA[Migrated my Getting Started with Solaris Containers article over from the old zazzybob.com site.
Cheers,
Kevin
]]></description>
			<content:encoded><![CDATA[<p>Migrated my <a href="../?page_id=92">Getting Started with Solaris Containers</a> article over from the old zazzybob.com site.</p>
<p>Cheers,</p>
<p>Kevin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=98</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SecCheck</title>
		<link>http://www.zazzybob.com/?p=84</link>
		<comments>http://www.zazzybob.com/?p=84#comments</comments>
		<pubDate>Mon, 09 Nov 2009 00:19:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=84</guid>
		<description><![CDATA[I&#8217;ve migrated the SecCheck security auditing tool for Solaris 10 over to the new zazzybob.com site. You can view the Project page here.
Cheers,
Kevin
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve migrated the SecCheck security auditing tool for Solaris 10 over to the new zazzybob.com site. You can view the Project page <a href="http://www.zazzybob.com/?page_id=79">here</a>.</p>
<p>Cheers,</p>
<p>Kevin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=84</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find a users working directory</title>
		<link>http://www.zazzybob.com/?p=75</link>
		<comments>http://www.zazzybob.com/?p=75#comments</comments>
		<pubDate>Sun, 08 Nov 2009 04:41:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=75</guid>
		<description><![CDATA[
First, perform a w or a who to find out which pseudo-terminal the user is using:


# w &#124; grep "oracle"
oracle   pts/12       Fri 3pm 3days                -bash


Now, we can find out the PID of [...]]]></description>
			<content:encoded><![CDATA[<p>
First, perform a <tt>w</tt> or a <tt>who</tt> to find out which pseudo-terminal the user is using:
</p>
<pre>
# w | grep "oracle"
oracle   pts/12       Fri 3pm 3days                -bash
</pre>
<p>
Now, we can find out the PID of the shell they&#8217;re using:
</p>
<pre>
# ps -ef | grep '[p]ts/12'
  oracle 11918 11916   0   May 18 pts/12      0:00 -bash
</pre>
<p>
Finally, use the <tt>pwdx</tt> command to find the <tt>pwd</tt> of the process:
</p>
<pre>
# pwdx 11918
11918:  /var/opt/oracle
</pre>
<p>Cheers,<br />
Kevin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=75</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Null delimit find output</title>
		<link>http://www.zazzybob.com/?p=72</link>
		<comments>http://www.zazzybob.com/?p=72#comments</comments>
		<pubDate>Sun, 08 Nov 2009 04:34:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GNU Tools]]></category>
		<category><![CDATA[One Liners]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=72</guid>
		<description><![CDATA[
If you are attempting to pipe the output of find to another command
such as xargs, and your files have quotes, spaces, or other &#8220;nonstandard&#8221;
characters in them, you can null terminate (rather than newline terminate) your
find output with -print0. You can then use the -0 option
to xargs to read the NUL delimeted output.


For example, I had [...]]]></description>
			<content:encoded><![CDATA[<p>
If you are attempting to pipe the output of <tt>find</tt> to another command<br />
such as <tt>xargs</tt>, and your files have quotes, spaces, or other &#8220;nonstandard&#8221;<br />
characters in them, you can null terminate (rather than newline terminate) your<br />
<tt>find</tt> output with <tt>-print0</tt>. You can then use the <tt>-0</tt> option<br />
to <tt>xargs</tt> to read the NUL delimeted output.
</p>
<p>
For example, I had a bunch of 1252 byte files in a directory with spaces in their<br />
filenames. So&#8230;</p>
<pre>
# find . -size 1252c -print0 | xargs -0 rm
</pre>
<p>
Too easy!
</p>
<p>Cheers,<br />
Kevin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=72</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excluding entries from logwatch reports</title>
		<link>http://www.zazzybob.com/?p=65</link>
		<comments>http://www.zazzybob.com/?p=65#comments</comments>
		<pubDate>Wed, 04 Nov 2009 22:18:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS/RHEL]]></category>
		<category><![CDATA[Logwatch]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=65</guid>
		<description><![CDATA[I use logwatch on all of my RHEL/CentOS hosts to mail daily digests of important log activity for eyeballing.
However, on my mail server, I run freshclam from cron, and this appears to confuse the clam-update logwatch script plugin. So, this leaves the question &#8211; how do you disable a specific plugin?
First, you can list the [...]]]></description>
			<content:encoded><![CDATA[<p>I use logwatch on all of my RHEL/CentOS hosts to mail daily digests of important log activity for eyeballing.</p>
<p>However, on my mail server, I run freshclam from cron, and this appears to confuse the clam-update logwatch script plugin. So, this leaves the question &#8211; how do you disable a specific plugin?</p>
<p>First, you can list the available script plugins:</p>
<pre>
# ls /usr/share/logwatch/scripts/services
</pre>
<p>In my case, the plugin I wanted to disable was clam-update (the script name will match the appropriate headed block within your logwatch output).</p>
<p>To disable, I added the following to <tt>/etc/logwatch/conf/logwatch.conf</tt></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Added 05/11/2009 - KW</span>
Service = <span style="color: #ff0000;">&quot;-clam-update&quot;</span></pre></td></tr></table></div>

<p>Once done, re-run logwatch. You should see the offending log block removed from your email.</p>
<pre>
# /etc/cron.daily/0logwatch
</pre>
<p>Cheers,<br />
Kevin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=65</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating a file on all zones at the same time</title>
		<link>http://www.zazzybob.com/?p=62</link>
		<comments>http://www.zazzybob.com/?p=62#comments</comments>
		<pubDate>Tue, 03 Nov 2009 06:11:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[One Liners]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=62</guid>
		<description><![CDATA[
I recently modified /etc/resolv.conf on all of my global zones after building new nameservers. I wanted a quick way to copy this updated configuration to all child zones. A simple one-liner does the trick on each global zone (assuming all your zones are in the /var/zones zonepath):

# zoneadm list &#124; grep -v global &#124; while [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>I recently modified <tt>/etc/resolv.conf</tt> on all of my global zones after building new nameservers. I wanted a quick way to copy this updated configuration to all child zones. A simple one-liner does the trick on each global zone (assuming all your zones are in the /var/zones zonepath):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># zoneadm list | grep -v global | while read zone; do cp -p /etc/resolv.conf /var/zones/${zone}/root/etc; done</span></pre></div></div>

<p>Cheers,<br />
Kevin</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=62</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking an HTTPS webserver</title>
		<link>http://www.zazzybob.com/?p=60</link>
		<comments>http://www.zazzybob.com/?p=60#comments</comments>
		<pubDate>Tue, 03 Nov 2009 06:10:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[One Liners]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=60</guid>
		<description><![CDATA[
It’s easy to telnet to port 80 on a “standard” non-SSL webserver, and issue a GET / in order to verify that the webserver is responding correctly. But how to do it over SSL? Just use the s_client command via the openssl tool
# openssl s_client -connect www.example.com:443
You’ll see details of the certificate chain displayed (as [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>It’s easy to telnet to port 80 on a “standard” non-SSL webserver, and issue a <tt>GET /</tt> in order to verify that the webserver is responding correctly. But how to do it over SSL? Just use the <tt>s_client</tt> command via the <tt>openssl</tt> tool</p>
<pre># openssl s_client -connect www.example.com:443</pre>
<p>You’ll see details of the certificate chain displayed (as well as any errors), and you can then issue your <code>GET /</code> to test the webservers operation.</p>
<p>You can also use this tool to test other SSL-enabled services (such as IMAPS/POP3S).</p>
<p>Cheers,<br />
Kevin</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=60</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing Bounces From the Mail Queue</title>
		<link>http://www.zazzybob.com/?p=56</link>
		<comments>http://www.zazzybob.com/?p=56#comments</comments>
		<pubDate>Tue, 03 Nov 2009 06:08:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[One Liners]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=56</guid>
		<description><![CDATA[
The following simple one liner will do the trick:

# mailq &#124; grep MAILER-DAEMON &#124; awk '{print $1}' &#124; sed 's/\*//' &#124; postsuper -d -

Cheers,
Kevin
]]></description>
			<content:encoded><![CDATA[<div>
<p>The following simple one liner will do the trick:</p>
<pre>
# mailq | grep MAILER-DAEMON | awk '{print $1}' | sed 's/\*//' | postsuper -d -
</pre>
<p>Cheers,<br />
Kevin</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=56</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate hashed passwords</title>
		<link>http://www.zazzybob.com/?p=54</link>
		<comments>http://www.zazzybob.com/?p=54#comments</comments>
		<pubDate>Tue, 03 Nov 2009 06:07:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[One Liners]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.zazzybob.com/?p=54</guid>
		<description><![CDATA[
Another OpenSSL related tip.
If you’ve ever wanted to generate a hashed password suitable for inclusion in the /etc/shadow file (for example, during post-install procedures such as sysidcfg), you can use the openssl passwd command

$ openssl passwd
Password:
Verifying - Password:
HaShEdPaSsCoMeSoUt

Cheers,
Kevin
]]></description>
			<content:encoded><![CDATA[<div>
<p>Another OpenSSL related tip.</p>
<p>If you’ve ever wanted to generate a hashed password suitable for inclusion in the <tt>/etc/shadow</tt> file (for example, during post-install procedures such as sysidcfg), you can use the <tt>openssl passwd</tt> command</p>
<pre>
$ openssl passwd
Password:
Verifying - Password:
HaShEdPaSsCoMeSoUt
</pre>
<p>Cheers,<br />
Kevin</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.zazzybob.com/?feed=rss2&amp;p=54</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
