<?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>systemBash &#187; System Administration</title>
	<atom:link href="http://systembash.com/tags/system-administration/feed/" rel="self" type="application/rss+xml" />
	<link>http://systembash.com</link>
	<description>Technology and System Administration</description>
	<lastBuildDate>Sat, 27 Feb 2010 02:12:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel='hub' href='http://systembash.com/?pushpress=hub'/>
		<item>
		<title>One Line Batch Rename Files Using CSV Input File and awk</title>
		<link>http://systembash.com/content/one-line-batch-rename-files-using-csv-input-file-and-awk/</link>
		<comments>http://systembash.com/content/one-line-batch-rename-files-using-csv-input-file-and-awk/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 17:12:32 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[csv]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=614</guid>
		<description><![CDATA[The Bash command environment, which is the namesake of this blog, is very flexible in that it allows you to manipulate the filesystem in many ways. Awk and sed are very powerful tools that allow you to do this rename with a simple one line command. This post will walk you through doing this with [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.gnu.org/software/bash/manual/bashref.html#What-is-Bash_003f">Bash</a> command environment, which is the namesake of this blog, is very flexible in that it allows you to manipulate the filesystem in many ways. <a href="http://linux.die.net/man/1/awk">Awk</a> and <a href="http://linux.die.net/man/1/sed">sed</a> are very powerful tools that allow you to do this rename with a simple one line command. This post will walk you through doing this with a Comma Separated Value (CSV) file and also using a simple regular expression to rename many files.<br />
<span id="more-614"></span><br />
The goal is  to rename a whole folder, hundreds of files, to a <a href="http://forum.boxee.tv/showthread.php?t=5214">proper format</a> for viewing in Boxee. The old listing, for example using ls -1, was:</p>
<pre>Seinfeld-(The Wig Master)-2003-09-26-0(1).avi
Seinfeld-(The Wink)-2004-01-03-0.avi
Seinfeld-(The Wizard)-2004-02-26-0.avi
Seinfeld-(The Yada Yada)-2003-06-04-0.avi
Seinfeld-(The Pen)-2004-06-22-0.avi</pre>
<p>I created a CSV file, and from the powers of the <a href="https://www.mturk.com/mturk/welcome">Amazon Mechanical Turk</a> services, generated an entire list of the correct filenames, in the format:</p>
<pre>Seinfeld.7x19.The.Wig.Master.avi
Seinfeld.7x04.The.Wink.avi
Seinfeld.9x15.The.Wizard.avi
Seinfeld.8x19.The.Yada.Yada.avi
Seinfeld.3x03.The.Pen.avi</pre>
<p>Now I just needed a way to actually do the rename.</p>
<p>The final CSV file I generated is in the format:</p>
<pre>Seinfeld-(The Wig Master)-2003-09-26-0(1).avi,Seinfeld.7x19.The.Wig.Master.avi
Seinfeld-(The Wink)-2004-01-03-0.avi,Seinfeld.7x04.The.Wink.avi
Seinfeld-(The Wizard)-2004-02-26-0.avi,Seinfeld.9x15.The.Wizard.avi
Seinfeld-(The Yada Yada)-2003-06-04-0.avi,Seinfeld.8x19.The.Yada.Yada.avi
Seinfeld-(The Pen)-2004-06-22-0.avi,Seinfeld.3x03.The.Pen.avi</pre>
<p>Note that in my format, there could be no commas in the file names; but you can use any other delimiter such as = or ;, it would work equally as well with a character change in the script.</p>
<p>Using awk, you can get a correct command line output from this file:</p>
<pre>awk -F',' '{print("mv &#92;"" $1 "&#92;" &#92;"" $2 "&#92;"")}' input.txt</pre>
<p>Results in a preview of your commands, like so:</p>
<pre>mv "Seinfeld-(The Wig Master)-2003-09-26-0(1).avi" "Seinfeld.7x19.The.Wig.Master.avi"
mv "Seinfeld-(The Wink)-2004-01-03-0.avi" "Seinfeld.7x04.The.Wink.avi"
mv "Seinfeld-(The Wizard)-2004-02-26-0.avi" "Seinfeld.9x15.The.Wizard.avi"
mv "Seinfeld-(The Yada Yada)-2003-06-04-0.avi" "Seinfeld.8x19.The.Yada.Yada.avi"
mv "Seinfeld-(The Pen)-2004-06-22-0.avi" "Seinfeld.3x03.The.Pen.avi"</pre>
<p>Note that we put the file names in quotes because they contain spaces, and linux won&#8217;t recognize the filenames if you don&#8217;t include that. The -F command in awk is where you specify your delimiter, so feel free to use another character. Once you have &#8216;proofed&#8217; the script to make sure it is doing what you expect it to, you execute it by adding |/bin/sh to the end, to pipe it directly to bash.</p>
<pre>awk -F',' '{print("mv &#92;"" $1 "&#92;" &#92;"" $2 "&#92;"")}' input.txt | /bin/sh</pre>
<p>This won&#8217;t result in any output, but you will see that it changed the names of your files, just as if you would have typed in the commands (proofed above) yourself.</p>
<p>If you don&#8217;t want to go through the bother of generating a CSV file, but you still want to use bash to rename files using awk, you can use a similar command which I found over at <a href="http://snipplr.com/view/3648/batch-file-rename-with-awk-and-sed/">Snipplr</a>.</p>
<pre>ls foo*.jpg | awk '{print("mv "$1" "$1)}' | sed 's/foo/bar/2'</pre>
<p>As with the other one, this will output the command to move the file but instead uses sed to do a search/replace of the string in the filename. Append |/bin/sh to execute the commands on your system.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/one-line-batch-rename-files-using-csv-input-file-and-awk/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>UbunTOS &#8211; Ubuntu 9.10 + TinyOS 2.x VirtualBox Image</title>
		<link>http://systembash.com/content/ubuntos-ubuntu-9-10-tinyos-2-x-virtualbox-image/</link>
		<comments>http://systembash.com/content/ubuntos-ubuntu-9-10-tinyos-2-x-virtualbox-image/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 01:05:56 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Programs]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[tinyos]]></category>
		<category><![CDATA[ubuntos]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=601</guid>
		<description><![CDATA[This is my admittedly minor but I hope useful contribution to the TinyOS development community. TinyOS is an Operating System and development framework for Wireless Sensor Networks and other platforms which has a small footprint and is very energy conscious.
The TinyOS source code is available for free online for many operating systems, however it takes a [...]]]></description>
			<content:encoded><![CDATA[<p>This is my admittedly minor but I hope useful contribution to the TinyOS development community. <a href="http://tinyos.net/">TinyOS</a> is an Operating System and development framework for Wireless Sensor Networks and other platforms which has a small footprint and is very energy conscious.</p>
<p>The TinyOS source code is available for free online for many operating systems, however it takes a long time to get the environment set up and it is not portable at all. I came across <a href="http://toilers.mines.edu/Public/XubunTOS">XubunTOS</a> but it did not seem to be in active development anymore, so I endeavored to install TinyOS 2.1 and 2.x from source into a regular Ubuntu image. The most help came from <a href="http://www.keally.org/2008/11/11/installing-tinyos-2x-on-ubuntu-with-iris-support/">Matt Keally&#8217;s Blog</a>. While doing this, I thought it might be useful to many others who wish to develop in the TinyOS framework but might not have the skills necessary to install it. Therefore, I developed this <a href="http://www.virtualbox.org/">VirtualBox</a> image so that you can install it on any system for which VirtualBox is available and supports USB passthrough for the programming of the motes. I&#8217;ve tested on Windows 7, Windows XP and it should work on any other host OS, but I would love to hear your feedback. All <a href="http://www.arsgeek.com/2007/05/10/exclusive-canonical-ltd-and-ubuntu-founder-mark-shuttleworth-announce-ubuntos/">funny business</a> aside, I present to the world UbunTOS:<span id="more-601"></span></p>
<p><a href="http://systembash.com/wp-content/uploads/2010/02/vboxubuntos.png"><img class="aligncenter size-full wp-image-605" title="vboxubuntos" src="http://systembash.com/wp-content/uploads/2010/02/vboxubuntos.png" alt="" width="453" height="230" /></a></p>
<h3>Features</h3>
<ul>
<li>Ubuntu 9.10 OS (patched through 2/5/2010)</li>
<li>Complete TinyOS development environment</li>
<li>TinyOS 2.1 Installed</li>
<li>TinyOS 2.x CVS Installed (default environment)</li>
<li>Portable for development in a variety of host environments</li>
<li>Patched motelist for MIB520 programming board</li>
</ul>
<h3>Directions</h3>
<ol>
<li>Unzip the file and import into VirtualBox. I recommend at least 768M RAM</li>
<li>Boot system</li>
<li>Enable USB passthrough for the programming board. Check off the USB device in the menu as shown:<br />
<img class="aligncenter size-full wp-image-606" title="vboxusb" src="http://systembash.com/wp-content/uploads/2010/02/vboxusb.png" alt="VirtualBox USB Passthrough" width="381" height="132" /></li>
<li>Check &#8216;motelist&#8217; to see which port it has been assigned to (motelist has been patched to see MIB520 programming board)</li>
<li>Program away! TinyOS resides in /opt/</li>
</ol>
<h3><span style="text-decoration: underline;">Download</span></h3>
<p>MD5 sum:    <strong>9a27ba7902337139c2eae0121ec6ca4e</strong></p>
<p>Download UbuntuTOS_Ubuntu-9.10_TinyOS-2.x.zip [2/8/2010]:    [ <a href="/devel/UbuntuTOS_Ubuntu-9.10_TinyOS-2.x.zip.torrent"><strong>torrent</strong></a> | <a href="http://static.systembash.com/UbuntuTOS_Ubuntu-9.10_TinyOS-2.x.zip"><strong>http</strong></a> ]</p>
<p>If you happen to have spare bandwidth, please <a href="http://systembash.com/contact/">send me a note</a> and I will link to the file via http or ftp.</p>
<h3>Notes</h3>
<ul>
<li>The default username is wcu and password is <strong>nosecurity</strong></li>
<li>The hostname is wcu-desktop, in honor of <a href="http://www.wcupa.edu">West Chester University</a> which is sponsoring my research into Wireless Sensor Networks.</li>
<li>To switch between the TinyOS 2.x and 2.1 environment, run the shell script /opt/tinyos-2.1.0/tinyos.sh or /opt/tinyos-2.x/tinyos-2.x.sh. By default the 2.x environment is loaded via ~/.bashrc/.</li>
<li>To update TinyOS 2.x with latest CVS Code:<br />
cd /opt; cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x</li>
<li>I&#8217;ve testing this using <em>Mica2 </em>and<em> Micaz</em>. Let me know if you have success with other combinations as I just do not have the hardware to test.</li>
<li>Usually the programming port and the data port are on consecutive ports. In the example above, the programming device is /dev/ttyUSB0 and the data port, for serialforwarder, is /dev/ttyUSB1</li>
</ul>
<h3>Known Bugs?</h3>
<p>If you have issues while enabling USB Passthrough, such as an error like:</p>
<p>Version:1.0 StartHTML:0000000105 EndHTML:0000001970 StartFragment:0000000127 EndFragment:0000001952</p>
<p><!--StartFragment--></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%" bgcolor="#eeeeee">
<tbody>
<tr>
<td>Result Code:</td>
<td>E_INVALIDARG (0&#215;80070057)</td>
</tr>
<tr>
<td>Component:</td>
<td>HostUSBDevice</td>
</tr>
<tr>
<td>Interface:</td>
<td>IHostUSBDevice {173b4b44-d268-4334-a00d-b6521c9a740a}</td>
</tr>
<tr>
<td>Callee:</td>
<td>IConsole {6375231a-c17c-464b-92cb-ae9e128d71c3}</td>
</tr>
</tbody>
</table>
<p>Reboot your host system. I believe this happens while reinstalling the passthrough driver for the USB device for the first time. Rebooting seems to fix this problem, and after the initial setup this problem seems to disappear.</p>
<p>If you have any other problems (or compliments!) please leave a message via the form below.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/ubuntos-ubuntu-9-10-tinyos-2-x-virtualbox-image/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Linux Command Line, Generating a Random File</title>
		<link>http://systembash.com/content/linux-command-line-generating-a-random-file/</link>
		<comments>http://systembash.com/content/linux-command-line-generating-a-random-file/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 01:53:41 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=581</guid>
		<description><![CDATA[It is very easy to create a random file using the linux command line. Much like the command to fill a file with all zeros, for example a 1 Meg file:
dd if=/dev/zero of=zero.filename bs=1024 count=1000
You do the same using /dev/urandom:
dd if=/dev/urandom of=random.filename bs=1024 count=1000
Resulting in a 1MB file:
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) [...]]]></description>
			<content:encoded><![CDATA[<p>It is very easy to create a random file using the linux command line. Much like the command to fill a file with all zeros, for example a 1 Meg file:</p>
<pre>dd if=/dev/zero of=zero.filename bs=1024 count=1000</pre>
<p>You do the same using /dev/urandom:</p>
<pre>dd if=/dev/urandom of=random.filename bs=1024 count=1000</pre>
<p>Resulting in a 1MB file:</p>
<pre>1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.0294247 s, 34.8 MB/s</pre>
<p>This is transferring random data from the virtual device urandom to the output file. We use /dev/urandom instead of /dev/random because the /dev/random source generates random data very slowly. urandom is much faster at this but remains very random, <a href="http://vinitsworld.blogspot.com/2008/10/difference-between-devrandom-and.htmlh">if not quite a random</a> as /dev/random. This should work with any system with <a href="http://linux.die.net/man/1/dd">dd</a> and /dev/urandom.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/linux-command-line-generating-a-random-file/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What I recently learned about EDID, Windows 7 and nVidia</title>
		<link>http://systembash.com/content/what-i-recently-learned-about-edid-windows-7-and-nvidia/</link>
		<comments>http://systembash.com/content/what-i-recently-learned-about-edid-windows-7-and-nvidia/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 18:39:16 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[drivers]]></category>
		<category><![CDATA[edid]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[windows-7]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=576</guid>
		<description><![CDATA[EDID stands for Extended display identification data and is what many computer monitors and televisions with a VGA/HDMI use to tell the PC what resolution they support. Which, in theory at least, is great.
However what I recently found out is that many LCD and Plasma televisions do not broadcast the correct 16:9 resolution via EDID, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Extended_display_identification_data">EDID</a> stands for <strong>Extended display identification data </strong>and is what many computer monitors and televisions with a VGA/HDMI use to tell the PC what resolution they support. Which, in theory at least, is great.</p>
<p>However what I recently found out is that many LCD and Plasma televisions do not broadcast the correct 16:9 resolution via EDID, and therefore the computer doesn&#8217;t know what resolution to display and you have a stretched image. <span id="more-576"></span></p>
<p>I have an <a href="http://www.lge.com/us/computer-products/monitors/LG-DU-37LZ30.jsp">LG DU-37LZ30</a> which according to its specs at least has a 1366&#215;768 native resolution (It is a 720p/1080i set). However its EDID system broadcasts a resolution of 1024&#215;768, resulting in the signal looking stretched. Some programs, like Boxee for example, can correct this by forcing an aspect ratio while outputting the video and the result looks fine. However in many situations this doesn&#8217;t work.</p>
<p>On Windows XP, this was a pain but buying a program like <a href="http://entechtaiwan.com/util/ps.shtm">PowerStrip</a> by EnTech was able to correct the problem as you can force a resolution even if it is a &#8220;non-supported&#8221; one. However on Windows 7, and with nVidia graphics cards/drivers at least, it apparently &#8216;enforces&#8217; the resolution which is broadcast via the EDID. Which means you are stuck with your weird resolution.</p>
<p>There are some hacks for overriding EDID info, but none of them seem to work on Windows 7. For example:</p>
<p><a href="http://www.avsforum.com/avs-vb/showthread.php?t=1091403">Thread over at AVS Forum on overrided EDID</a><br />
<a href="http://forums.nvidia.com/lofiversion/index.php?t56039.html">Modifying your VGA cable to disable EDID broadcast</a> (this nuked my VGA cable! Do not recommend!)<br />
<a href="http://www.sevenforums.com/graphic-cards/11324-possible-use-1366x768.html">Forcing 1366&#215;768 on Windows 7 forums</a></p>
<p>None of these solutions worked for me. Windows 7 even allows you to add a &#8220;custom&#8221; resolution but it still reads from the EDID to see if it is compatible and it has rejected my attempts at this.</p>
<p>Although I appreciate the &#8220;ease&#8221; that reading the EDID provides for general users, I wish there was an &#8220;advanced&#8221; section so that us users can force a resolution on a monitor. Maybe this is disabled because people were breaking their monitors, but it puts others like us in a lurch.  Has anyone seen this issue and/or have a resolution? Or do I just have a great reason to get a new TV?</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/what-i-recently-learned-about-edid-windows-7-and-nvidia/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tweaking TCP for Fast (100mbps+) Connections and Transfers on Linux</title>
		<link>http://systembash.com/content/tweaking-tcp-for-fast-100mbps-connections-and-transfers-on-linux/</link>
		<comments>http://systembash.com/content/tweaking-tcp-for-fast-100mbps-connections-and-transfers-on-linux/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 01:26:24 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[tcp/ip]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=516</guid>
		<description><![CDATA[We recently did some speed testing on a few of the servers on our network, and we were not receiving the speeds expected considering they were sitting on a physical 100mbps ethernet port. The servers were indeed on physical 100mbps connection, however wget (TCP/IP, HTTP Port 80) download tests showed only a max of about 1.5MB/sec (note the 8bit/byte conversion, so this translates to about 12mbits).]]></description>
			<content:encoded><![CDATA[<p>We recently did some speed testing on a few of the servers on our network, and we were not receiving the speeds expected considering they were sitting on a physical 100mbps ethernet port. The servers were indeed on physical 100mbps connection, however wget (TCP/IP, HTTP Port 80) download tests showed only a max of about 1.5MB/sec (note the 8bit/byte conversion, so this translates to about 12mbits).</p>
<p><a href="http://systembash.com/wp-content/uploads/2009/12/fastnetwork.png"><img class="aligncenter size-full wp-image-519" title="fastnetwork" src="http://systembash.com/wp-content/uploads/2009/12/fastnetwork.png" alt="" width="531" height="203" /></a></p>
<p>This is due to how TCP frames data packets and optimizes them for connections. I believe by default TCP on most systems assumes about a 10mbit max capable transfer rate, so it does not show performance gains on a larger pipe without modification to the kernel options which govern TCP/IP frame size and features. Some distributions may make this change for you automatically however many will not.</p>
<p>To keep things short and sweet, we took the following advice from <a href="http://www.speedguide.net/">Speedguide.net</a> on tweaking TCP parameters on linux kernel systems. This will cover Linux 2.1 and above &#8211; which means CentOS, RedHat, Ubuntu, Debian and many more distributions.</p>
<p>The TCP Parameters we will change are:</p>
<ul>
<li>/proc/sys/net/core/rmem_max - Maximum TCP Receive Window</li>
<li>/proc/sys/net/core/wmem_max &#8211; Maximum TCP Send Window</li>
<li>/proc/sys/net/ipv4/tcp_timestamps - (<a href="http://www.ietf.org/rfc/rfc1323.txt">RFC 1323</a>) timestamps add 12 bytes to the TCP header&#8230;</li>
<li>/proc/sys/net/ipv4/tcp_sack &#8211; tcp selective acknowledgements.</li>
<li>/proc/sys/net/ipv4/tcp_window_scaling &#8211; support for large TCP Windows (<a href="http://www.ietf.org/rfc/rfc1323.txt">RFC 1323</a>). Needs to be set to 1 if the Max TCP Window is over 65535.</li>
</ul>
<p>If you recall /proc/ is the volatile portion of kernel configuration, you can change it on the fly but it will be reset on reboot unless settings are changed via an init file or setting the options in /etc/sysctl.conf. To change the settings once (to test):</p>
<pre class="prettyprint">echo 256960 > /proc/sys/net/core/rmem_default
echo 256960 > /proc/sys/net/core/rmem_max
echo 256960 > /proc/sys/net/core/wmem_default
echo 256960 > /proc/sys/net/core/wmem_max
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_sack
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling</pre>
<p>And to apply them for good, add the following lines to /etc/sysctl.conf:</p>
<pre class="prettyprint">net.core.rmem_default = 256960
net.core.rmem_max = 256960
net.core.wmem_default = 256960
net.core.wmem_max = 256960
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_window_scaling = 1</pre>
<p>Use &#8217;sysctl -p&#8217; to apply the changes in this file to your running Linux instance. Feel free to experiment with these numbers to see how they impact your transfers, it depends a lot on how many and how large the files are that you transferring. These changes must be made on the SERVER side, any change on the client side would not impact the download speed from the server.</p>
<p>There are several other variables to consider, and these all depend on your application so change them if you know what you are attempting to do. After changing these settings, you will see speeds of about 10MB/sec (80mbps) on a 100mbps connection. The other 20mbps are lost in TCP and other network layer overhead, which is unavoidable.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/tweaking-tcp-for-fast-100mbps-connections-and-transfers-on-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To Reset Windows XP, Vista, Windows 7 Passwords with Ubuntu 9.10 Live Image and a USB Drive</title>
		<link>http://systembash.com/content/how-to-reset-windows-xp-vista-windows-7-passwords-with-ubuntu-9-10-live-image-and-a-usb-drive/</link>
		<comments>http://systembash.com/content/how-to-reset-windows-xp-vista-windows-7-passwords-with-ubuntu-9-10-live-image-and-a-usb-drive/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 10:40:03 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[chntpw]]></category>
		<category><![CDATA[livecd]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=497</guid>
		<description><![CDATA[I put this together for a project in a class I am taking, and thought it would be handy for others as well. The goal is to access a Windows filesystem and reset the password for a user, for example if someone forgot the Administrator password or the account is locked out from too many [...]]]></description>
			<content:encoded><![CDATA[<p>I put this together for a project in a class I am taking, and thought it would be handy for others as well. The goal is to access a Windows filesystem and reset the password for a user, for example if someone forgot the Administrator password or the account is locked out from too many bad password login attempts. This works on all modern Windows Operating Systems: Windows 2000, 2003, XP, Vista, Win7 etc. Make sure to create a backup if you want to make sure you don&#8217;t corrupt your Windows install, as it can happen.</p>
<p>Tools used:</p>
<ul>
<li><a href="http://unetbootin.sourceforge.net/">Unetbootin</a></li>
<li><a href="http://www.ubuntu.com/GetUbuntu/download">Ubuntu 9.10 Desktop ISO</a></li>
<li>One flash drive, 1 gig or larger</li>
<li><a href="http://home.eunet.no/pnordahl/ntpasswd/">chntpw</a></li>
</ul>
<h2>Accessing the Filesystem</h2>
<p>First we use unetbootin to install Ubuntu 9.10 to a flash drive. The flash drive needs to be at least 1GB to install the image.</p>
<p style="TEXT-ALIGN:left"><a href="http://systembash.com/wp-content/uploads/2009/10/dmg77wv_74f94fzmp7_b.png"><img class="aligncenter size-full wp-image-498" title="Unetbootin settings" src="http://systembash.com/wp-content/uploads/2009/10/dmg77wv_74f94fzmp7_b.png" alt="Unetbootin settings" width="479" height="355" /></a></p>
<p style="TEXT-ALIGN:left">Select &#8220;Diskimage&#8221; and then the .iso file we downloaded of the Ubuntu 9.10 image.</p>
<p style="TEXT-ALIGN:left">Select the USB Drive and Drive Letter to install the ISO onto. Click OK:</p>
<p style="TEXT-ALIGN:left"><a href="http://systembash.com/wp-content/uploads/2009/10/dmg77wv_75c3sfj7gx_b.png"><img class="aligncenter size-full wp-image-499" title="Unetbootin doing its thing" src="http://systembash.com/wp-content/uploads/2009/10/dmg77wv_75c3sfj7gx_b.png" alt="Unetbootin doing its thing" width="479" height="355" /></a></p>
<p>Once the program is done, click &#8216;exit&#8217; and remove the USB Drive. You now have a bootable live image of Ubuntu 9.10.</p>
<p>Plug the usb drive into the target system. Boot off of the drive, you may need to change the boot options in the BIOS if it is set to boot off of the hard drive. Select &#8220;Default&#8221; in the unetbootin boot menu to boot into the Ubuntu OS. It will automatically log you in.</p>
<p>Once booted you already have access to the Windows filesystem since the ntfs filesystem driver is included in the kernel. This is nice and wasn&#8217;t the case not too long ago.</p>
<p>We chose two reasons to use unetbootin and Ubuntu 9.10. The first is the ease of use of installing a bootable image. After downloading the two packages, it is trivial to load the OS onto the drive, and since it includes ntfs drivers it allows us to access the unencrypted hard drive on boot. Since it is on a USB drive, any system made since 2000 or so should be able to boot this. You don&#8217;t need to lug around a CD or even access the CD drive.</p>
<p>To prevent easy access to the hard drive, encryption of the hard drive partition would be necessary using <a href="http://technet.microsoft.com/en-us/library/cc875821.aspx">Microsoft EFS</a> or <a href="http://www.truecrypt.org/">TrueCrypt</a> hard drive encryption software. After encrypting the hard drive, any live operating system running would not be able to decrypt the hard drive easily.</p>
<p>Furthermore, installation of a BIOS level password would ensure that any unauthorized users would not be able to boot alternative operating systems via USB, CDROM, Floppy or other method. The only way to defeat a BIOS level password would be to reset the BIOS (requiring entrance into the hardware of the system) or using an Evil Maid style attack.</p>
<p>The <a href="http://theinvisiblethings.blogspot.com/2009/10/evil-maid-goes-after-truecrypt.html">Evil Maid</a> attack is performed by a theoretical malicious party that has access to the target PC without alerting the legitimate user. Without knowledge of the authorized; a root kit or device would be installed (for example, on the USB connector of the keyboard) to sniff out the password as entered on bootup. After the user boots the system and finishes her work, ostensibly shutting down the system securely, at least to her knowledge, the Evil Maid would then collect the password entered into the BIOS, thereby defeating the BIOS password security measure.</p>
<h2>Resetting the Password</h2>
<p>We can now reset the Administrator or any other password on this system using the tool <a href="http://home.eunet.no/pnordahl/ntpasswd/">chntpw</a>. To install this package, ensure the system has a connection to the internet (via dhcp perhaps?) and run the command:</p>
<pre>sudo software-properties-gtk --enable-component=universe --enable-component=multiverse; sudo apt-get update; sudo apt-get install chntpw</pre>
<p>Alternatively, you can download the executable and place it on the USB drive to give access without connecting to the internet. chntpw is the software that modifies the SAM (Security Accounts Manager) database file. Use the terminal to change directories to the password file</p>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">cd /media/path/to/disk/WINDOWS/system32/config/</span></p>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">Then execute the chntpw utility:</span></span></p>
<pre>  # sudo chntpw -u username SAM SYSTEM</pre>
<p>View the sample output:</p>
<pre>ubuntu@ubuntu:/media/B830C9BC30C981BC/WINDOWS/system32/config$ sudo chntpw SAM SECURITY
chntpw version 0.99.5 070923 (decade), (c) Petter N Hagen
Hive &lt;SAM&gt; name (from header): &lt;\SystemRoot\System32\Config\SAM&gt;
ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c &lt;lf&gt;
Page at 0x7000 is not 'hbin', assuming file contains garbage at end
File size 262144 [40000] bytes, containing 6 pages (+ 1 headerpage)
Used for data: 255/20736 blocks/bytes, unused: 9/3648 blocks/bytes.

Hive &lt;SECURITY&gt; name (from header): &lt;emRoot\System32\Config\SECURITY&gt;
ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c &lt;lf&gt;
Page at 0xe000 is not 'hbin', assuming file contains garbage at end
File size 262144 [40000] bytes, containing 13 pages (+ 1 headerpage)
Used for data: 1074/49024 blocks/bytes, unused: 9/3808 blocks/bytes.

* SAM policy limits:
Failed logins before lockout is: 0
Minimum password length        : 0
Password history count         : 0
| RID -|---------- Username ------------| Admin? |- Lock? --|
| 01f4 | Administrator                  | ADMIN  | dis/lock |
| 03ec | ASPNET                         |        | dis/lock |
| 03ed | CSC603                         | ADMIN  | dis/lock |
| 01f5 | Guest                          |        | dis/lock |
| 03e8 | HelpAssistant                  |        | dis/lock |

---------------------&gt; SYSKEY CHECK &lt;-----------------------
SYSTEM   SecureBoot            : -1 -&gt; Not Set (not installed, good!)
SAM      Account\F             : 1 -&gt; key-in-registry
SECURITY PolSecretEncryptionKey: 1 -&gt; key-in-registry

***************** SYSKEY IS ENABLED! **************
This installation very likely has the syskey passwordhash-obfuscator installed
It's currently in mode = -1, Unknown-mode
SYSKEY is on! However, DO NOT DISABLE IT UNLESS YOU HAVE TO!
This program can change passwords even if syskey is on, however
if you have lost the key-floppy or passphrase you can turn it off,
but please read the docs first!!!

** IF YOU DON'T KNOW WHAT SYSKEY IS YOU DO NOT NEED TO SWITCH IT OFF!**
NOTE: On WINDOWS 2000 it will not be possible
to turn it on again! (and other problems may also show..)

NOTE: Disabling syskey will invalidate ALL
passwords, requiring them to be reset. You should at least reset the
administrator password using this program, then the rest ought to be
done from NT.

Do you really wish to disable SYSKEY? (y/n) [n]
RID     : 0500 [01f4]
Username: Administrator
fullname:
comment : Built-in account for administering the computer/domain
homedir : 

User is member of 1 groups:
00000220 = Administrators (which has 2 members)

Account bits: 0x0210 =
[ ] Disabled        | [ ] Homedir req.    | [ ] Passwd not req. |
[ ] Temp. duplicate | [X] Normal account  | [ ] NMS account     |
[ ] Domain trust ac | [ ] Wks trust act.  | [ ] Srv trust act   |
[X] Pwd don't expir | [ ] Auto lockout    | [ ] (unknown 0x08)  |
[ ] (unknown 0x10)  | [ ] (unknown 0x20)  | [ ] (unknown 0x40)  | 

Failed login count: 1, while max tries is: 0
Total  login count: 1

- - - - User Edit Menu:
 1 - Clear (blank) user password
 2 - Edit (set new) user password (careful with this on XP or Vista)
 3 - Promote user (make user an administrator)
 4 - Unlock and enable user account [probably locked now]
 q - Quit editing user, back to user select
Select: [q] &gt;</pre>
<p>Depending on the status of the SYSKEY password security, you may only be able to blank the password and not actually change it. I recommend blanking the password and then resetting it once you log into the system.</p>
<p>You can also unlock a system if the user accounts have all been locked out due to too many login attempts or any other reason. Using these tools you can gain access to almost any unencrypted Windows system, from Windows NT up to Windows 7.</p>
<p>As a warning, If there is data on the hard drive you wish to keep, make sure to make a backup of the hard drive before performing this password as it can corrupt the Windows installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/how-to-reset-windows-xp-vista-windows-7-passwords-with-ubuntu-9-10-live-image-and-a-usb-drive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Copy Files to Many USB Drives Quickly and Easily</title>
		<link>http://systembash.com/content/copy-files-to-many-usb-drives-quickly-and-easily/</link>
		<comments>http://systembash.com/content/copy-files-to-many-usb-drives-quickly-and-easily/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 21:00:51 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Other Code]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[key drive]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[usb drive]]></category>
		<category><![CDATA[usb key drive]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=452</guid>
		<description><![CDATA[
I was recently tasked with copying speaker&#8217;s presentations, files and handouts onto 100s of USB Drives (key drives) for a conference that work is hosting down in Washington, D.C. My first thought was that it was going to be a pain to have to copy/paste the files to each drive. I thought about creating a [...]]]></description>
			<content:encoded><![CDATA[<p><center><a href="http://systembash.com/wp-content/uploads/2009/09/photo.jpg" rel="lightbox" title="The USB Drives"><img src="http://systembash.com/wp-content/uploads/2009/09/photo-300x225.jpg" alt="photo" title="photo" width="300" height="225" class="alignnone size-medium wp-image-453" /></a></center></p>
<p>I was recently tasked with copying speaker&#8217;s presentations, files and handouts onto 100s of USB Drives (key drives) for a conference that work is hosting down in Washington, D.C. My first thought was that it was going to be a pain to have to copy/paste the files to each drive. I thought about creating a batch script to copy the files with a double click. But really, who wants to be doing all of that clicking and/or typing? Work smarter, not harder.</p>
<p>Then I remembered a neat feature that <a href="http://www.2brightsparks.com/syncback/sbse.html">SyncBackSE</a>, a program I use at home for backups, has available. The backup program &#8211; which is basically a file copy process &#8211; can be triggered based on the insert of a drive, whether that be a USB Key Drive or an External Hard Drive. Using the program, the only action you need to do to trigger the copy process is literally plug the drive in. After the machine recognizes the drive and mounts it to a drive letter, the copy process starts automatically.</p>
<p>Here are the directions on how to set this up.</p>
<ol>
<li>
<div style="float: right; padding: 15px 0 15px 15px;"><a href="http://systembash.com/wp-content/uploads/2009/09/photo-1.jpg" rel="lightbox" title="USB Hub"><img src="http://systembash.com/wp-content/uploads/2009/09/photo-1-150x150.jpg" alt="USB Hub" title="USB Hub" width="150" height="150" class="alignnone size-thumbnail wp-image-455" /></a></div>
<p><strong>Prepare your system</strong>. Install <a href="http://www.2brightsparks.com/syncback/sbse.html">SyncBackSE</a>. I have purchased the full program at home, but since I am using this for a limited task you can just install the 30-day trial. Create a folder, on your desktop or location of choice, with the files you want to be copied to the filesystem. Copy files to that folder, this is your &#8220;source directory&#8221;. Plug in as many USB drives as you can, in my case I used a USB hub with two handy top USB ports. Note which letter these drives assign themselves as. </li>
<li><strong>Set up the Source and Destination</strong>. The Source will be the &#8220;source directory&#8221; of any files you wish to copy. The Destination will be the USB Drive Letter. If you are able to plug more than one drive in at a time, you will need to create separate profiles for each one, with differing drive letters. Create them at first or just copy the first profile you make, and switch the Destination Drive on each one.</li>
<p><center>
<div style="margin-left: -20px;"><a href="http://systembash.com/wp-content/uploads/2009/09/usbdrive2.png" title="Source and Destination Settings" rel="lightbox"><img src="http://systembash.com/wp-content/uploads/2009/09/usbdrive2.png" alt="Source and Destination Settings" title="usbdrive2" width="484" height="85" class=" size-full wp-image-460" border=0/></a></div>
<p></center></p>
<li>Modify the profile. <strong>This is where the magic happens.</strong> Under profile setup, go to &#8220;Click for Options&#8221; and check off &#8220;Expert&#8221;. Select When and then &#8220;Insert&#8221;. Check off &#8220;Run this profile when:&#8221; and select the drive letter under &#8220;is inserted into drive&#8221;. Also check off &#8220;Run unattended&#8221; &#8211; this will ensure it does not prompt you when you plug in your drive each time. The other options should remain with <any label>. A summary of these settings is in the figure below.</li>
</ol>
<p><center><a href="http://systembash.com/wp-content/uploads/2009/09/usbdrive3.png" rel="lightbox" title="Settings for Auto Copy"><img src="http://systembash.com/wp-content/uploads/2009/09/usbdrive3-300x86.png" alt="Settings for Auto Copy" title="Settings for Auto Copy" width="300" height="86" class="aligncenter size-medium wp-image-461" /></a></center></p>
<p>That is it! Test by inserting a USB drive. You should see the profile change to &#8220;Running&#8221; then then &#8220;Success&#8221; after files have been completed. The screen will look as follows:</p>
<p><center><a href="http://systembash.com/wp-content/uploads/2009/09/usbdrive1.png" rel="lightbox" title="Final Product"><img src="http://systembash.com/wp-content/uploads/2009/09/usbdrive1-300x53.png" alt="Final Product" title="Final Product" width="300" height="53" class="aligncenter size-medium wp-image-462" /></a></center></p>
<p>In my experience, the part that takes the longest was Windows XP discovering the new drive and then assigning the drive letter. This PC is slow, so I imagine on a faster machine this process would actually be much quicker. I ended up having to re-copy the drives since someone added their handouts in the last minute, but the drive discovery process happened much faster the second time around.  I was able to do about 100 drives in 30 minutes, so this process is actually very speedy and works very well.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/copy-files-to-many-usb-drives-quickly-and-easily/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Install SNMP on Tomato Router Firmware and Graph Traffic with Cacti</title>
		<link>http://systembash.com/content/how-to-install-snmp-on-tomato-router-firmware-and-graph-traffic-with-cacti/</link>
		<comments>http://systembash.com/content/how-to-install-snmp-on-tomato-router-firmware-and-graph-traffic-with-cacti/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 01:16:39 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Other Code]]></category>
		<category><![CDATA[Programs]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=406</guid>
		<description><![CDATA[You&#8217;ve flashed your old WRT54G or other vanilla router with the Tomato firmware. This itself turns your router into a lean, mean routing machine with QOS, SSH and more, but let&#8217;s say we want to take it a bit further. What it we want to get some more stats out of it?
In order to do [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve flashed your old WRT54G or other vanilla router with the <a href="http://www.polarcloud.com/tomato">Tomato firmware</a>. This itself turns your router into a lean, mean routing machine with QOS, SSH and more, but let&#8217;s say we want to take it a bit further. What it we want to get some more stats out of it?</p>
<p>In order to do this, we first need to set up a way to pull this information from the router. The best way to do this is to install an SNMP (<strong><span style="text-decoration: underline;">S</span></strong>imple <span style="text-decoration: underline;"><strong>N</strong></span>etwork <strong><span style="text-decoration: underline;">M</span></strong>anagement <strong><span style="text-decoration: underline;">P</span></strong>rotocol) daemon on the system.</p>
<p>The main roadblock we face here is that the system mainly runs in volatile system memory, meaning that every time the system is rebooted the filesystem is reset. Fortunately Tomato provides a way to get around this using CIFS shares. Follow the steps below (as modified from <a href="http://www.linksysinfo.org/forums/showthread.php?t=51064">here</a>) to install an SNMP server on a Tomato router.</p>
<ol>
<li>Create a network (samba, CIFS) share somewhere on the network. This computer must be on all of the time in order for Tomato to run the SNMP server.</li>
<li>Download the snmpd.zip file from one of these locations:<br />
[<a href="http://bok.xs4all.nl/downloads/snmpd.zip">xs4all.nl</a>]<br />
[<a href="http://systembash.com/source/snmpd.zip">systembash</a>]</p>
<p>expand the binary and .conf file into the share or a subdirectory (for example, &lt;share name&gt;/snmp)</p>
<p>MD5 for snmpd binary is ae0d622648efdb8dceb7b3b5a63e23ac</li>
<li style="text-align: center; ">Set up the shared directory on the router. Visit Administration-&gt;CIFS Client. Add the share as follows, with your correct share information:<img class="aligncenter size-full wp-image-428" title="cifs1" src="http://systembash.com/wp-content/uploads/2009/08/cifs11.png" alt="cifs1" width="360" height="258" /></li>
<li>Log into the Tomato router via ssh, and start SNMPd on the router by issuing the command:
<pre>/cifs1/snmp/snmpd -c /cifs1/snmp/snmpd.conf &amp;</pre>
</li>
<li> Test that SNMP is running and can be accessed on another computer on the network. To test it, you can use snmpwalk like so:
<pre>snmpwalk -c public -v 2c &lt;IP Address of Router&gt;</pre>
<p>If it works properly, it will list the available OIDs from the router. You do not need to take note of these, but they will be used in the graphing software later.</li>
<li>Finally, we need to launch the SNMP server when the router is restarted. You do this by adding the command to start it in the area Administration -&gt; Scripts -&gt; Firewall:
<pre>sleep 30
/cifs1/snmp/snmpd -c /cifs1/snmp/snmpd.conf -s &amp;</pre>
<p>This launches the snmp server 30 seconds after the router is started or rebooted.</li>
</ol>
<p>Thats it! SNMP is now running on the router.</p>
<p>Now to add this SNMP host to your graphing software. For this example, I will use <a href="http://www.cacti.net/">Cacti</a>, which I will assume you have already set up. If you need to set it up, please <a href="http://www.cacti.net/documentation.php">follow the directions</a> on the Cacti site for installation.</p>
<p>First, add the router as a new device, using the information below (change IP to suite your needs):</p>
<p><center><img class="aligncenter size-full wp-image-430" title="adddevice" src="http://systembash.com/wp-content/uploads/2009/08/adddevice.png" alt="adddevice" width="338" height="768" /></center></p>
<p>After adding the device, you have several options depending on what sort of data you are looking for. For system information on the router &#8211; for example CPU usage, memory usage, etc; you can go directly to Create -&gt; New Graphs. Select your device and then add the graph you are looking for.</p>
<p>The graph will show as a broken image at first, or a blank graph with &#8220;NaN&#8221; as the data source. Give it a few minutes to update, and the information should start to flow through. The ucd/net options work best, but feel free to experiment.</p>
<p>To get traffic stats on the interface, you first need to &#8220;Walk&#8221; the device.  Go back to your device list, and edit the device you added. Under &#8220;Associated Data Queries&#8221;, Add Data Query, add &#8220;SNMP &#8211; Interface Statistics&#8221; with Re-Index period as &#8220;Uptime goes backwards&#8221;. After adding it you should see under status something like: Success [39 Items, 6 Rows].</p>
<p>Since these data sources are now added, you can go back to Add a new Graph. After selecting the device, you should see a list of these new interfaces. Select the interfaces you wish to graph, and select the graph type (I suggest In/Out bits with Total).</p>
<p>After a few minutes, the data should start filling in. After a while, you will get a graph like this:</p>
<p><center><a href="http://systembash.com/wp-content/uploads/2009/08/graph_image.php1.png"><img src="http://systembash.com/wp-content/uploads/2009/08/graph_image.php1-300x120.png" alt="graph_image.php" title="graph_image.php" width="300" height="120" class="aligncenter size-medium wp-image-435" /></a></center></p>
<p><em>In conclusion</em>, with a little work, you can get enterprise class graphing from your consumer router. The total project took me about 45 minutes, and I was trying to figure out all of the data sources and the correct way to enter everything.</p>
<p>Let me know your experiences, suggestions and corrections!</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/how-to-install-snmp-on-tomato-router-firmware-and-graph-traffic-with-cacti/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Social Media and the Downfall of the Password Reset Question</title>
		<link>http://systembash.com/content/social-media-and-the-downfall-of-the-password-reset-question/</link>
		<comments>http://systembash.com/content/social-media-and-the-downfall-of-the-password-reset-question/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 20:04:14 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[accounts]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=416</guid>
		<description><![CDATA[There have been a number of high profile account compromises due to the insecurity of password reset questions. Examples of two big ones off the top of my head are Sarah Palin Yahoo account compromise and the Twitter &#8220;Hacker Croll&#8221; fiasco. There have been many more compromises on accounts due to weaknesses in password reset questions, even [...]]]></description>
			<content:encoded><![CDATA[<p>There have been a number of high profile account compromises due to the insecurity of password reset questions. Examples of two big ones off the top of my head are <a href="http://www.computerworld.com/s/article/9116606/Tenn._student_indicted_for_hacking_Palin_s_e_mail">Sarah Palin Yahoo account</a> compromise and the <a href="http://www.crn.com/security/218501441">Twitter &#8220;Hacker Croll&#8221;</a> fiasco. There have been many more compromises on accounts due to weaknesses in password reset questions, even if they are rarely as publicized in the main stream media like the previous two. The attacks are basically the same &#8211; primary e-mail accounts are typically secured by password, and the password can be changed by entering an answer to a password reset question.</p>
<p>Both of these account compromises were caused by weak password reset questions. And although Palin certainly was/is a high profile account, the Twitter compromise was caused by a low-profile IT Administrator who happened to store sensitive company documents in their Google Docs folder. This goes to show that everyone, from the CEO of a large company, to a low-level system administrator, is accountable for the security of their accounts.</p>
<p><strong>Sample (bad) Password Reset Questions:</strong></p>
<p><strong><span style="font-weight: normal;">Many e-mail accounts use a typical range of password reset questions:</span></strong></p>
<ul>
<li>What is your mother&#8217;s maiden name?</li>
<li>What was your first pet&#8217;s name?</li>
<li>What is your favorite sport?</li>
<li>What is your oldest daughter&#8217;s name?</li>
<li><a href="http://www.goodsecurityquestions.com/examples.htm">More Questions</a></li>
</ul>
<p>Even questions regarded as &#8220;Good&#8221; on this list are easily guessable if you have access to the social networks of an individual. For example: What is the middle name of your youngest child? What is your oldest sibling&#8217;s middle name? Answers to these questions often appear on Facebook or other social media websites.</p>
<p>After coming up with the idea to write this article, I took a look at my own email account password reset question. It was set to my Father&#8217;s middle name. I had probably set this when I first signed up for a  beta account back in 2005 or so &#8211; I was not in the mindset that it would become my primary account and also be the gateway to a bevy of information. As with many folks, when I sign up for a new account on a website, it will often e-mail me my account information (including my password, boo!) to my e-mail account. And, as I suspect with most people, I do not follow best practices and use a different password for each account. Not to mention that many other accounts will send an email to your account on file in order to reset their passwords. Therefore, since not only the main account password at risk, there is a lot riding on the security of your email account. If someone can gain access to your email account, they also gain access to a lot of frequently used passwords and accounts. Domain hijacking has occurred using this method.</p>
<h3>The Solution</h3>
<p>The first step is that password reset questions must not be answerable by information available via social networking sites. For someone who is very active in social networking, this might be hard to come up with at first, but really is not hard.</p>
<p><strong>A good password reset question is:</strong><br />
Not easily guessable from online or offline sources (<strong>secure</strong>)<br />
Stays the same over a long period of time (<strong>stable</strong>)<br />
Is readily recallable by authoritative person (<strong>obtainable</strong>)<br />
Has only one answer (<strong>definitive</strong>)</p>
<p>My source for questions that satisfy these metrics is my wallet. I look for cards that have information that will stay the same for a long period of time, for example, a driver&#8217;s license, library card or other membership card.</p>
<p>You can then reset your password question to a value on those cards. If the site does not let you ask your own password reset question, you might try to replace a common one, such as &#8220;mother&#8217;s maiden name&#8221; with this. Just be careful you don&#8217;t get too tricky, or you might forget the correct question/response to the answer and lose access to your account for good.</p>
<p>For a sample answer, you might use the first 5 digits of your driver&#8217;s license ID, plus the last 6 of your gym membership card. Really you can use any information that you want that you do not share on social media websites.  Just make sure they follow the four guidelines above.</p>
<p>Do you have any tips for a good password reset question?</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/social-media-and-the-downfall-of-the-password-reset-question/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Command Line Packet Sniff Existing Running Process in Linux</title>
		<link>http://systembash.com/content/command-line-packet-sniffing-existing-running-process-in-linux/</link>
		<comments>http://systembash.com/content/command-line-packet-sniffing-existing-running-process-in-linux/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 13:57:23 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[system admin]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=398</guid>
		<description><![CDATA[Have you ever come across a server that is doing a lot of traffic? Maybe you have logged in to see a process running at 100% CPU, so you know the culprit, but instead of kill -9ing it, wouldn&#8217;t it be great to see what exactly it is up to? Or even if you see [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever come across a server that is doing a lot of traffic? Maybe you have logged in to see a process running at 100% CPU, so you know the culprit, but instead of kill -9ing it, wouldn&#8217;t it be great to see what exactly it is up to? Or even if you see a process and don&#8217;t know exactly what it is doing, and you are just curious what it is up to?</p>
<p><img src="http://systembash.com/wp-content/uploads/2009/07/terminal-icon-64x64.png" alt="terminal-icon-64x64" title="terminal-icon-64x64" width="64" height="64" class="alignnone size-full wp-image-401" style="float: right; padding: 0 0 15px 15px;"/>As with most issues there are several ways to skin this cat. You can use <a href="http://www.chm.tu-dresden.de/edv/manuals/aix/cmds/aixcmds5/tcpdump.htm">tcpdump</a> or <a href="http://www.wireshark.org/">wireshark </a>to sniff the all of the network traffic on the device. If you know the port the program is running on (you can use <a href="http://en.wikipedia.org/wiki/Lsof">lsof</a> for that), you can restrict traffic to that port. But what if the program is jumping ports, or even uses a side-port for some sort of data transmission (UDP?).</p>
<p>The main problem going down this route is that on a server that is doing any significant bit of traffic, it is like sorting through a needle in a haystack. If you have a single process that is taking up all of your bandwidth, you can probably find it pretty fast. But if the process is not doing a ton of traffic it can be hard to track down.</p>
<h2>Strace to the rescue</h2>
<p>You can use the great program strace to sniff the network data that an executed program is doing, or even a currently running program. This works well because if you are trying to isolate the network traffic a currently running process, your options can be limited. Using strace is the only way that I know of to see ALL of the traffic coming from a process.</p>
<p>To check the traffic of a currently running process X:</p>
<pre class="prettyprint lang-bsh">strace -p X -f -e trace=network -s 10000</pre>
<p>The command breaks down:</p>
<ul>
<li>-p: process ID</li>
<li>-f: follow forks</li>
<li>-e: follow set of system calls. In our case, we use trace=network, which follows network system calls.</li>
<li>-s: set output string sizes. default is 32, which does not  give a lot of information.</li>
</ul>
<p>Finally if you have a new program to execute and you want to watch the network traffic on it, you execute that command with strace. This would be good to use if you work in a highly secure environment and need to find out what sort of network traffic a distributed binary is doing. Checking for a program &#8216;Phoning home&#8217; is a good example of that.</p>
<p>Here is the command that launches a new process:</p>
<pre class="prettyprint lang-bsh">strace -f -e trace=network -s 10000 /usr/bin/command arguments</pre>
<p>Hopefully using strace in this manner will help you debug some issues on your server &#8211; I know I have used it several times.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/command-line-packet-sniffing-existing-running-process-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
