<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
	<title>www.linux-noob.com Community Blog List</title>
	<link>http://www.linux-noob.com/forums/index.php?app=blog</link>
	<description>Community Blog List Syndication</description>
	<pubDate>Fri, 27 Aug 2010 12:25:55 +0000</pubDate>
	<webMaster>admin@linux-noob.com (www.linux-noob.com)</webMaster>
	<generator>IP.Blog</generator>
	<ttl>60</ttl>
	<item>
		<title>NoobBlog? - Fail2Ban Rocks!</title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=45]]></link>
		<category></category>
		<description><![CDATA[Okay, so the title is misleading: <a href='http://www.fail2ban.org/wiki/index.php/Main_Page' class='bbc_url' title='External link' rel='nofollow'>Fail2Ban</a> isn't an IDS, it just monitors logfiles and takes action when something is matched.<br />
<br />
Let's rewind a moment. On all my servers, I am running <a href='http://www.logwatch.org/' class='bbc_url' title='External link' rel='nofollow'>logwatch</a>, which comes with most installations (as in: a default install usually includes logwatch) and -- to be frank -- I can't think of reasons NOT to use it. In the past, the only reasons people have given me for not using it are that they didn't know about it, or they didn't know what it was but it was filling up root's mailbox so they disabled it.<br />
<br />
My take? If you're not interested in monitoring your own server, then it can't be that important to you. And you shouldn't whinge when someone's rooted it and it's part of a botnet, or spewing out spam. And don't moan when your ISP disconnects you for running a compromised server - they never installed it, YOU did. Take responsibility.<br />
<br />
Allrighty, I'll get off my soapbox now.<br />
<br />
So, checking logfiles and taking necessary action (reporting intrusion attempts, blocking nefarious IPs generating suspicious activity, etc) became a daily chore. Well, not THAT much of a chore, since the work began to fall off as the server became gradually locked down, but at least I could sleep safely, knowing that the server was protected -- or at least I'd be aware if there was untoward activity.<br />
<br />
Since the server runs an IRC network, it used to get port-scanned regularly. To safeguard that, I added the excellent <a href='http://www.securityfocus.com/infocus/1580' class='bbc_url' title='External link' rel='nofollow'>portsentry</a> service: receiving numerous connections from a single IP to different ports above a predefined threshold triggers the addition of an IPtables rule to block any further activity originating from that source. And since logwatch informed me of those attempts, I could provide the IP owners with evidence that someone was running sniffers on their network (or that their servers had become compromised). Hey, any little help here and there helps reduce the botnets and erode the increasing tide of spam, after all.<br />
<br />
But portsentry only works by opening a pile of fake ports and awaits connections to them; it cannot use any ports that already have services bound to them -- such as mail/web/ftp and the like -- so someone sniffing Apache for known vulnerabilities wouldn't trigger portsentry. Hmm... back to the drawing board.<br />
<br />
I began by rolling my own: I wrote a simple PHP page that compared the incoming HTTP request to a list of known vulnerabilities and responded with an appropriate reply (or inappropriate and downright rude, depending upon how you look at it), then added a Apache rule that rewrote all incoming HTTP attempts to this page. This provided me with a number of benefits: it reduced my error logs (since the request WAS matched) which made for smaller logwatch reports, and enabled me to gather stats upon what kind of vulnerabilities were being targetted. Many similar ones came up: <a href='http://blog.trendmicro.com/malware-exploits-horde-vulnerability/' class='bbc_url' title='External link' rel='nofollow'>Horde</a>, <a href='http://www.google.co.uk/search?q=awstats+vulnerability' class='bbc_url' title='External link' rel='nofollow'>AWstats</a>, <a href='http://www.securiteam.com/unixfocus/5XP0F154VK.html' class='bbc_url' title='External link' rel='nofollow'>phpmyadmin</a>... all of which served to improve the script I had.. but didn't actually do anything to BLOCK those attempts, just trap them.<br />
<br />
Enter Fail2ban. A friend started using it on one of her servers, and once she had it up and running, I <a href='http://talesofthenewb.blogspot.com/2009/09/i-initially-started-looking-at-some.html' class='bbc_url' title='External link' rel='nofollow'>used her guide</a> to get it configured and running on one of mine. Essentially it works like (the now-deprecated) logsentry; checks logfiles and takes proactive action once trigger condition(s) are met. Just what the doctor ordered!<br />
<br />
So, configuration, then. The config file (jail.conf) is full of examples and handy information; two sub-directories contain pre-defined configs for matching suspicious activity (filter.d) and generic responses (action.d). The documentation suggests enabling one or two and giving it a go.. it really WAS that simple. Well, okay -- it was to me since many of the settings made sense. But I'll show you one or two of my configs:<br />
<br />
<pre class='prettyprint'>&#91;apache-w00tw00t&#93;
enabled  = true
filter   = apache-w00tw00t
action   = iptables-allports&#91;name=w00tw00t&#93;
           mail-whois&#91;name=w00tw00t, dest=root, sender=fail2ban@myserver.org&#93;
logpath  = /var/log/httpd/access_log
maxretry = 3
## -- don't unban
bantime  = -1

## --------- more apache blocks ---------
&#91;apache-sniffers&#93;
enabled  = false
filter   = apache-sniffers
action   = iptables-allports&#91;name=sniffers&#93;
           mail-whois-lines&#91;name=sniffers, dest=root, sender=fail2ban@myserver.org,logpath=/var/log/httpd/access_log&#93;
logpath  = /var/log/httpd/access_log
maxretry = 3
bantime  = -1

&#91;apache-phpmyadmin&#93;
enabled  = true
port     = http,https
filter   = apache-phpmyadmin
action   = iptables-allports&#91;name=phpmyadmin&#93;
           mail-whois-lines&#91;name=phpmyadmin, dest=root, sender=fail2ban@myserver.org, logpath=/var/log/httpd/access_log&#93;
logpath  = /var/log/httpd/access_log
maxretry = 3
bantime  = -1</pre><br />
<br />
There are three blocks here, titled with the name in square brackets. Let's look at the first:<br />
<ul class='bbc'><li>fail2ban looks in the apache logfile (the <strong class='bbc'>logpath</strong> entry)<br /></li><li>A regular exp<b></b>ressi&#111;n is in the apache-w00tw00t.conf file (the <strong class='bbc'>filter</strong> entry), in the filter.d subdirectory,<br /></li><li>once there are more than three matches (the <strong class='bbc'>maxretry</strong> setting)...<br /></li><li>two actions are performed: iptables-allport.conf and mail-whois.conf (the <strong class='bbc'>action</strong> directive), both located in the action.d directory<br /></li><li>the bantime says how long the block should be for -- in this case, it's permanent</li></ul><br />
So, what are the filters? Here's my "apache-w00tw00t.conf" file:<br />
<br />
<pre class='prettyprint'>&#91;Definition&#93;

# Option:  failregex
# Notes.:  regex to match the w00tw00t scan messages in the logfile. The
#          host must be matched by a group named "host". The tag "&lt;HOST&gt;" can
#          be used for standard IP/hostname matching.
# Values:  TEXT
## *** examples: ***
##&lt;HOST&gt; - - &#91;29/Apr/2008:22:54:08 +0200&#93; "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 326
##89.19.27.114 - - &#91;02/Oct/2009:23:16:25 +0200&#93; "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 311 "-" "-"
#failregex = ^&lt;HOST&gt; -.*"GET &#092;/w00tw00t&#092;.at&#092;.ISC&#092;.SANS&#092;.DFind&#092;:&#092;).*".*
## -- amended this to remove DFind&#092;:&#092;).*".* and SANS.test0:)
failregex = ^&lt;HOST&gt; -.*"GET &#092;/w00tw00t&#092;.at&#092;.ISC&#092;.SANS&#092;..*&#092;:&#092;).*".*

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT

ignoreregex =</pre><br />
<br />
No, I didn't create this from scratch - I copied an existing one (apache-badbots.conf) then amended it. Actually, I cheated - I stole <a href='http://howflow.com/tricks/block_w00tw00t_scan_hosts_with_fail2ban' class='bbc_url' title='External link' rel='nofollow'>someone else's blog entry</a>, but you can see how it works. However, at this point I need to mention a few things that weren't immediately obvious to me:<br />
1. You can only have one <strong class='bbc'>filter</strong> entry in the jail.conf per block - but the filter file can actually contain <span class='bbc_underline'>several</span> regular exp<b></b>ressi&#111;ns, newline separated.<br />
2. The <strong class='bbc'>&lt;HOST&gt;</strong> bit in the regular exp<b></b>ressi&#111;n is a memory variable - the IP is grabbed into this variable for analysis and reporting later.<br />
3. The <strong class='bbc'>ignoreregex</strong> bit are subtracted from the "failregex" matches, so useful to whitelist false positives here. Currently, mine is blank.<br />
4. All regular exp<b></b>ressi&#111;ns use <a href='http://python.about.com/od/regularexp<b></b>ressi&#111;ns/g/regex_spec_char.htm' class='bbc_url' title='External link' rel='nofollow'>Python syntax</a> which threw me.<br />
<br />
Let's look at that last bit again. I don't know python regular exp<b></b>ressi&#111;ns (or how they differ from perl-compatible/posix-compliant), but <a href='http://ubuntuforums.org/showthread.php?t=486890' class='bbc_url' title='External link' rel='nofollow'>another blog post</a> told me of the <a href='http://linux.die.net/man/1/fail2ban-regex' class='bbc_url' title='External link' rel='nofollow'>fail2ban-regex</a> utility for testing out your matches. Neat, eh?<br />
<br />
So, onto the actions. Unlike the filters, there can be multiple action lines: in my case, the following actions are performed:<br />
<ul class='bbc'><li><strong class='bbc'>iptables-allport</strong> - adds an IPtables block for ALL ports, essentially runs "iptables -A INPUT -s <em class='bbc'>ThatIPAddress</em> -j DROP"<br /></li><li><strong class='bbc'>mail-whois</strong> - sends an email, but also includes the WHOIS information for that IP address so I can extract the abuse email addres and forward it on.<br /></li><li><strong class='bbc'>mail-whois-list</strong> - as above, but also includes the logfile lines, so evidence can be directly forwarded. I was going to amend one of the files in the action.d directory, only to find someone had beaten me to it!</li></ul><br />
Just one final tip: some of these scripts in the action.d directory require parameters setting when calling them. That's the bit in the square brackets following the action:<br />
<br />
<pre class='prettyprint'>mail-whois-lines&#91;name=phpmyadmin, dest=root, sender=fail2ban@myserver.org, logpath=/var/log/httpd/access_log&#93;</pre><br />
<br />
So in this case:<br />
<ul class='bbc'><li>The name of the jail is "<strong class='bbc'>phpmyadmin</strong>" which features in the email notification (I don't know if spaces are permitted here)<br /></li><li>The destination email is "<strong class='bbc'>root</strong>" (which gets forwarded off this server via the /etc/aliases file)<br /></li><li>The <strong class='bbc'>sender</strong> is.. well, you can work that out, and you can also work out that I've not included my real email address there. By using a specific sender, I can then filter on the "From:" field in mail headers.<br /></li><li>The <strong class='bbc'>logpath</strong> tells grep which file to search and pull out matching lines for evidence. For some reason it wouldn't accept the path already set, so needed to be specified again. I noted in action.d/mail-whois-lines.conf that this field is set to "/dev/null", but I think that's intended as a default setting.</li></ul><br />
Wow. That seems a lot of info up there. But twitter this is not! I hope it helps someone.]]></description>
		<pubDate>Sun, 13 Dec 2009 12:29:00 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=45]]></guid>
	</item>
	<item>
		<title>NoobBlog? - Catching up...</title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=42]]></link>
		<category></category>
		<description><![CDATA[Okay, so been some time since I posted anything, thought I'd best stick my nose back in and make my presence known.<br />
<br />
To catch up: I completed the documentation I was writing for course manuals mentioned below, and in the process installed Ubuntu8.10 to trial it out, comparing differences. Many things I quite liked, and there are some deffo improvements over the Fedora ways of doing things. However, there are a few tools I felt lacking, but in the grand scheme of things that was a weak comeback from the Fedora camp - Ubuntu seems vastly superior in many aspects.<br />
<br />
Anyway, material was completed to the satisfaction of several that deliver the training course - and in the meantime I learned a great deal about recent developments in the Linux world: the event-driven framework (replaces the inittab and init.d stuff), PolicyKit, EXT4. Still gotta get to grips with SELinux, mind.<br />
<br />
In the meantime a shared server of mine running Fedora6 with Ensim control panel is now well and truly buggered. For those not in the know, Ensim embeds itself deeply into the underlying OS to present a web-driven front-end to manage domain-grouped services. For what it offers, I felt it was better (more powerful and feature-richer) than CPanel. A major drawback is that you can't just go yum-updating binaries at will, they need to be Ensim-aware binaries. Fairy snuff, just add the Ensim repos to /etc/yum.repos.d/. Oh wait, that won't work flawlessly, since some binaries clash with RedHat's own. Okay, so let's disable the RH repos. No, that won't do either, since Ensim don't mirror RH packages on their repos, so yum can't resolve dependencies. GAHHHHHHHH! Dependency hell all over again!<br />
<br />
Oh, did I forget to mention another major drawback? Yes. When some of the python libraries break, there's buggerall help with trying to get them fixed. No simple yum-erase/yum-install, not even downloading and unpacking an RPM to extract files needed to replace corrupted ones. Our hosting company suggested blatting the server and reinstalling - the Microsoft option - which was a road we walked in the past on another server, in which we used Ensim to make backups per hosted domain then restored those to the fresh server pretty seamlessly (needed a minor tweak here and there). But this time with a broken control panel, no recent site backups exist. We tried some of the Ensim forums and were led to believe that it WAS possible to mend a broken install insitu.. but nobody could provide instructions nor point us to a guide. Feh.<br />
<br />
In the end, we decided to build a new server from scratch and ditch any control panel. And, of course, after my recent dalliances with Fedora10 v Ubuntu, I knew which was a better distro.<br />
<br />
So why am I sticking to RedHat for my new server, then? (Actually CentOS - but let's not quibble: stroganoff or curry, they're both stews.) Cowardly familiarity is one thing. The other is that my server co-owner had issues with the first distro he tried (CentOS or Fed10 I can't remember - but it wasn't anything Canonical) so settled on Fed9. What's surprising is that he flies a Debian flag on his home boxen... however he's had root-level privs on one of my Mandrake servers for best part of two years and in that time he's proven he can adapt to other distros.<br />
<br />
(for the wary: "root-level privs" means he's included in /etc/sudoers. Nobody knows the root pass on that server. Not even me.)<br />
<br />
Oh, as for other news: renovating my new home is coming along nicely, but spending time doing small plastering/tiling/filling/sanding/grouting jobs here and there are taking up a LOT of my time.<br />
<br />
But you'll hear from me again, soon!]]></description>
		<pubDate>Tue, 21 Jul 2009 22:30:00 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=42]]></guid>
	</item>
	<item>
		<title>NoobBlog? - Fedora 10 experiences - day 2</title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=33]]></link>
		<category></category>
		<description><![CDATA[This morning, I power it back up and let it replay the journal log (ext3 rocks!), then SSH back in - or try to. Okay, Jenna's having second thoughts about our brief encounter last night, but a <b>chkconfig --level 2345 iptables off</b> ensures the chastity belt's lost for good (or at least until I get around to editing the ruleset). However, the same networking issue arises: eth0 is naked! A few attempts at restarting it finally brings it back up again (with warnings) as per before. Hmmm... Google finally uncovers the networking issue: a new parameter <b>NM_CONTROLLED=no</b> prevents the network interface being affected by NetworkManager, which apparently is what the /etc/init.d/network script now calls. Let's change that and try it out later; for the moment I can slip in.<br /><br />So onto the graphical desktop. I can wobble my windows and rotate the cube when dragging windows, but those other effects seem to be missing. Google uncovers another page showing which packages are required for full wobbliness/wetness/weirdness, and in the end I added the following:<br /><br />* compiz-0.7.8-4.fc10.i386<br />* compizconfig-python-0.7.8-1.fc10.i386<br />* compiz-fusion-0.7.8-2.fc10.i386<br />* compiz-fusion-extras-0.7.8-2.fc10.i386<br />* compiz-fusion-extras-gnome-0.7.8-2.fc10.i386<br />* compiz-fusion-gnome-0.7.8-2.fc10.i386<br />* compiz-gnome-0.7.8-4.fc10.i386<br />* compiz-manager-0.6.0-8.fc10.noarch<br />* gnome-compiz-manager-0.10.4-4.fc10.i386<br /><br />* fusion-icon<br />* libcompizconfig-0.7.8-1.fc10.i386<br /><br />* emerald-0.7.8-1.fc10.i386<br />* emerald-themes-0.5.2-2.fc8.noarch<br /><br />Eventually I get an entry in Preferences&gt;Look And Feel showing "CompizConfig Settings Manager". Wahoo! B-B-B-But.. remember that issue with Fed8 not doing those Beryl things that Fed7 did easily? Again, they reveal themselves: I used to be able to rotate the cube with the mouse wheel, but not any longer. Google, the ever wonderful font of knowledge, directed me to a ubuntu forum which suggests using a plugin called "Viewport Mouse Switcher" but it doesn't exist in Fed10.<br /><br />Also, clicking and dragging on the desktop with the mouse wheel allowed me to tilt and move the cube; now it's CTRL+ALT+mouse button but the windows no longer levitate off the cube ("Raise on rotate", I think). Gotta find those settings. What was also handy was CTRL+ALT+PageDn to "open" the cube out and scroll through the faces before zooming back into one. Another setting I need to find.<br /><br />I need a cup of tea. More to report later.]]></description>
		<pubDate>Fri, 30 Jan 2009 16:14:00 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=33]]></guid>
	</item>
	<item>
		<title>NoobBlog? - Fedora 10 experiences - day 1</title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=32]]></link>
		<category></category>
		<description><![CDATA[So, our Linux training course originally written for RH6.1 but updated for RH8 then FC4 needs updating. And muggins here volunteered.<br /><br />Actually, it runs on Fedora7 kit, so whilst some content in the course manuals is still on the historical side, the majority is still relevant, and I'm able to talk around the new differences and emerging standards that's missed by the book - even to the point of satisfying SuSE, CentOS and RHEL users attending our courses. But the notes definitely DO need a bit of refreshing, as well as adding in recent developments (read: ubuntu stuff).<br /><br />So, let's look at freshening the fedora stuff to Fed10. So here I am with a new install and some new experiences.<br /><br />Footnote (or bellynote, due to its position): A bit ago I tried upgrading a Fed7 to 8 box to compare differences. Firstly, I noticed graphical stuff was smoother, GUI tools looking a bit neater. But <b>beryl</b> no longer works. Managed to get <b>compiz</b> working, but some normal Beryl-like behaviour wasn't forthcoming. Other than that, most other apps and services appear similar. Rather than faff about with getting GUI effects sorted, I left it and we continued to run the course on Fed7.<br /><br />Back to the plot. Well, the install went pretty smoothly - the number of screens have been reduced to almost idiot-proof levels. A progress bar showed me what RPMs were being installed, and I knew I could <b>yum</b> any missing ones later. Once it was over, I rebooted to the HD, getting the "welcome to your new install - please configure it now" and continued on my merry way.<br /><br />At this stage, I wasn't able to specify any information about proxy servers, so the request to forward hardware specs upstream to Red Hat couldn't be granted. Yes, I'm happy to reconsider, but there's a reason I block outgoing port 80 connections by default, Red Hat. There's a reason I use a proxy server. There should be a facility where I could specify this information, or at least log it for later forwarding.<br /><br />A quick <b>yum update</b> revealed over 400M of packages to be updated. WHAT? Checking some, I could see several were extraneous stuff I didn't *really* need (games and the like) and others were dependencies. Java libraries weighed in at a hefty 47M, <i>glibc</i> is still as heavy as ever, some perl stuff had a suitably fat entourage, and <i>evolution-help</i> was 40M. Eh? <i>evolution-server</i> is only about 100k. And looking at it, all the other evolution packages were remarkably streamlined. But the help system is 40MEG? Ah, hell - a quick <b>yum -y</b> and head for a bite to eat, let it chug and strain my poor intertubes for a bit.<br /><br />In the meantime I noticed networking was flicked on DHCP. I ran <b>setup</b> and gave it a static IP and name (JENNA - I'm a Blake's 7 fan), noting that it still found my default gateway and DNS server. Well, it would - my DHCP server gave this info out and the Fed10 box can't magically change its MAC address so it happily picked up an older (if not obsolete) setting. Flicked it over to static, quick <b>/etc/init.d/network reload</b> and... nothing. Eh? Nope, <b>ifconfig</b> still revealed the old IP. Okay then, <b>/etc/init.d/network restart</b> killed lo (loopback) and eth0, brought lo up and... no eth0. Strange. Restart again, and some errors came up (a file already existed?). <b>ifconfig</b> now revealed the existence of eth0, but alas! It was naked. No IP bound. A third attempt finally got a working IP. Relief!<br /><br />Or was it? Nope. In the network restart, <b>/etc/resolv.conf</b> had lost my domain information, but some comments suggested I put <b>DNS1=</b> and <b>DOMAIN=</b> in my <b>ifcfg-eth0</b> file (located at <b>/etc/sysconfig/network-scripts/</b> if you must know). So, a quick edit here and there, and name resolution worked.<br /><br />So let's try tapping in over ssh (I use PUTTY under Windows). Nada. Jenna responds to pings, but not ssh. Okay, so ICMP foreplay shows that she's certainly attentive, but won't put out. Aha! <b>iptables -L</b> revealed some rulesets; <b>/etc/init.d/iptables stop</b> persuaded her to drop the chastity belt. So far, so good - I'm able to continue. In the meantime, let's drop it from run-level 5 to 3, I don't need a graphical desktop. So a quick <b>init 3</b> aaaaand... I'm disconnected. Yup, either iptables has reloaded and spared Jenna's blushes, or networking has slammed the door on my face. It's late and I'm tired, so I just power the thing down.]]></description>
		<pubDate>Fri, 30 Jan 2009 00:00:00 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=32]]></guid>
	</item>
	<item>
		<title>the rooster crows - Small Bash Script to Help Record TV</title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=8&showentry=31]]></link>
		<category></category>
		<description><![CDATA[So I have a TV Tuner Card but haven't spent the time to figure out how to install and use something like MythTV, plus I am not sure if it works with over the air broadcast which is what I use.  I have installed the ivtv stuff and got the card working.  I just lack any wonderful software to make good use of the recording aspect.  I use mplayer to watch tv and it works just great.  ~: mplayer /dev/video0  works just like that.  If the tv stream gets choppy I make a buffer using the -cache option like so ~: mplayer -cache 2048 /dev/video0 and that seems to smooth out any choppiness.  So the two things I needed to figure out was how to stop recording after a certain amount of time and how to schedule it to start recording at a certain time.  I tried and failed at using crontab to start or stop mplayer or a script using mplayer.  I gave up and used my limited bash skills to create this probably very unnecessary script but it does what I need so I thought I would share my solution to my problem and see if anyone else cares to improve it or use it for themselves.<br /><pre class='prettyprint'>#!/bin/bash
# recordtv.sh 

HOME=/home/user

if &#91; -z $1 &#93; || &#91; -z $2 &#93;
then echo "Usage: recordtv 'wait time' 'duration'" "Use h,m,s suffix.  Ex recordtv 10m 1h" 
exit
else
echo "Start recording in $1 for $2"
sleep $1
mplayer /dev/video0 -really-quiet -dumpstream -dumpfile $HOME/recordedtv.out &
sleep $2
killall mplayer
fi
exit
</pre> <br /><br />So if I want to start recording a show that starts in 10 minutes that last for 1 hour I can type<br />~: recordtv 10m 1h<br />And it does it's thing.<br /><br />Thanks,<br />Eric]]></description>
		<pubDate>Sat, 10 Jan 2009 17:14:00 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=8&showentry=31]]></guid>
	</item>
	<item>
		<title>NoobBlog? - Christmas @ Home</title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=29]]></link>
		<category></category>
		<description><![CDATA[So, myself and <a href="http://www.urbandictionary.com/define.php?term=swmbo" target="_blank">SWMBO</a> spent our first Christmas in our own home.  There was the usual opening of cards, unwrapping of gifts, tucking into a good roast and fine chilled wine over the sounds of Christmas hits from times past (70s/80s) being recycled on yet another "${celebrity}'s Top Xmas Hits" show... but this year was different - it's been a Christmas that I've felt quite settled in some years, since (I believe) being a new homeowner, we've not had the threat of an impending move hovering, <a href="http://en.wikipedia.org/wiki/Damocles" target="_blank">Damocles-like</a>. It was indeed a very relaxing time.<br />
<br />
Man In Red brought a couple of good comic books: <a href="http://en.wikipedia.org/wiki/The_Boys_(comics)" target="_blank">The Boys </a>and <a href="http://en.wikipedia.org/wiki/Lucifer_(DC_Comics)" target="_blank">Lucifer</a>. Cracking reads, them.<br />
<br />
Oh, right - I'd better post something Linuxy. Well, I'm going to take the opportunity to get my server migrated over to CentOS at some point (still running FunkyCoar4) so I started cleaning it down in preparation for the upgrade. Well, I say upgrade, but essentially I'm going to do a fresh build, copy over data, databases and various other mods, as well as configuring services as they were on the old box. I aim to have a cleaner build.<br />
<br />
My plan of action is essentially:<br />
+ get a list of packages (RPMs), removing unneeded ones<br />
+ backup of /etc files, as well as any other configs lying around<br />
+ ensure my custom scripts are in /usr/local/bin and /usr/local/sbin (where they SHOULD have been originally!) and TAR up those dirs.<br />
+ TAR up /home (everything else is in mounted LVM slices, not on root disk)<br />
<br />
The first was pretty straightforward. A quick <b>rpm -qa | sort > rpm-list.txt</b> gave me a list, and I then ran <b>rpm -qi</b> on each package to learn a bit more about it before deciding to give it the ol' file13 treatment (<b>rpm -e</b> to erase). Some of the packages were obvious ones to keep - apache, postfix, php, mysql - as well as some that provided dependencies (gcc/automake and the like). Of course, I got into dependency hell for a bit and had to backtrack several times before discovering some obscure lil package was a minor requirement for perl or kernel modules, etc. Still, I cleaned out most of the graphical packages and streamlined the base footprint somewhat.<br />
<br />
Then I discovered - to my horror - a few non-RPM-installed apps failed to work, one of which was the excellent <b>hellanzb</b>, used for some newsgroup access I frequent. After observing the error messages closely it seemed I'd removed some crucial python packages, but was unsure which were required. All I could do was refer back to my original list (<b>grep -i py rpm-list.txt</b>) and try reinstalling each, retrying hellanzb to see if that particular package reduced the error messages at all (and rpm -e if not). Although I only had 7 or so packages to check it only took the first three before I had success - <b>python-twisted</b> seemed to be the requirement. *phew!*<br />
<br />
Moral of the story? Have a planned (organised and structured) approach to your tasks - including a planned backout route. Although I never consciously created the former, my original <b>rpm-list.txt</b> sufficed for this purpose. Saved my bacon well, that did.<br />
<br />
Ring in the New Year!<br />
<br />
(footnote: seems the blog doesn't like the formatting for lists. Odd...)]]></description>
		<pubDate>Fri, 26 Dec 2008 23:23:00 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=29]]></guid>
	</item>
	<item>
		<title>NoobBlog? - Break the cherry time!</title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=28]]></link>
		<category></category>
		<description><![CDATA[Hi, all.<br /><br />Well, Anyweb's got a blog module plumbed into the linux-noob forums, so I thought I'd take full advantage of it by abusing it as a soapbox mouthpiece. Erm.. I mean, I thought I'd take the plunge into the world of blogdom and post some thoughts.<br /><br />What *IS* a blog? That is one of the questions surrounding the true purpose of a blog, when in fact blogs have existed pre-internet days. Of course, they weren't web-logs... they were called "columns" in newspapers, or a "comment" as musings from the editor. In some ways, you could argue that The Secret Diary Of Adrian Mole and Bridget Jones' Diary are both book-blogs of a kind, be them written purely for entertainment purposes (and thus being somewhat flexible with the true events that occured) but they're still supposed to be a singular viewpoint for someone else to read and ponder over.<br /><br />I've seen blogs from developers struggling against some coding challenge, finally posting their proposed solution which has helped me in some of my coding endeavours. I've read blogs from sysadmins who have documented their findings for implementing some new service, for which I have been grateful since I've learned by their mistakes. I've also viewed blogs of people in other industries having a rant against something, for which I either nod smugly in agreement (and feel glad that it isn't just ME that encounters it) or snigger childishly at the author's ill-informed viewpoint, leading them to inaccurate and misleading conclusions. Maybe I'm just voyeuristic in that regard.<br /><br />So what DO people post, and why? Anyone familiar with facebook/livejournal/deadjournal/myspace will have encountered people wanting to vent their frustrations or just give others a deeper view into their psyche. Maybe to feed off the comments to placate their mood, or to feel they're not alone in their anger. Oh, wait.. that comes back to the prior paragraph, doesn't it? A need to belong, a requirement to feel they're not alone in the way in which they've been (mis)treated?<br /><br />If you're looking for that kinda of post here, well.. I think you're in the wrong place. Look, this IS a *Linux* forum after all, so expect me to post some geekiness stuff here once in a while, maybe even the majority of the time. And if I descend into spleen-splitting spittle-spraying vent (try saying THAT after a few drinks) then a comment to tell me to chill out, or even a quick tweak from the moderators here and there ought to get me back onto the right track. Can't say no fairer than THAT can I, eh, squire?<br /><br />So this is my first blog post. How was it for you? Did the earth move? Were you satisfied?<br /><br />If not, I hope you'll give me the opportunity to right that for you.<br /><br />Later!]]></description>
		<pubDate>Wed, 24 Dec 2008 14:05:00 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=14&showentry=28]]></guid>
	</item>
	<item>
		<title><![CDATA[Dark Distorted's Blog - Windows or Linux??]]></title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=11&showentry=17]]></link>
		<category></category>
		<description><![CDATA[Today i decided to install Mandriva 2008.1 onto my Inspiron 6400 Laptop. The Installtion went smoothly and much quicker then Windows has ever taken. All of my drivers were setup and installed automaticly, which once again NEVER happens when installing windows.<br /> Ive tried using different linux distros before in the past but never really stuck with it due to the lack of compatibility with hardware/software at the time. I set up my laptop with a dual WinXp Home /Mandriva 2008 boot using the Grub boot loader. Since i have setup the dual boot i have found myself mainly in Linux.<br /><br />Its funny how someone has to pay an arm and a leg to setup and use microsoft products and also has to deal with all of the headaches and system errors along with everyone favourite screen ... the "Blue Screen of Death".<br />]]></description>
		<pubDate>Thu, 24 Apr 2008 01:33:32 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=11&showentry=17]]></guid>
	</item>
	<item>
		<title>the rooster crows - xine engine error fix</title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=8&showentry=8]]></link>
		<category></category>
		<description><![CDATA[First blog!<br /><br />So when I try to play a dvd in xine I get these errors.<br /><a href="http://i217.photobucket.com/albums/cc80/leuchtenbergia/xineerror.jpg" target="_blank">picture here</a><br />Xine Engine Error.<br />There is no input plugin available to handle "dvd:/"<br />Maybe MRL syntax is wrong or file/stream source doesn't exist.<br /><br />The source can't be read.<br />Maybe you don't have enough rights for this, or source doesn't<br />contain data (e.g.:not disc in drive ) (/dev/dvd)<br /><br />So to fix it, I type this into the terminal.<br /><br />sudo ln -s /dev/scd0 /dev/dvd<br /><br />There it is I hope this helps someone.<br />Now the only problem is that this only works until I reboot, then I must do it again.  <br />So if anyone knows how to make this a more permanent fix please let me know.<br /><br />]]></description>
		<pubDate>Tue, 22 Jan 2008 01:54:07 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=8&showentry=8]]></guid>
	</item>
	<item>
		<title><![CDATA[Corkster's Blog - My first blog]]></title>
		<link><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=2&showentry=2]]></link>
		<category></category>
		<description>blog blog blog blog</description>
		<pubDate>Sun, 20 Jan 2008 16:20:01 +0000</pubDate>
		<guid><![CDATA[http://www.linux-noob.com/forums/index.php?app=blog&blogid=2&showentry=2]]></guid>
	</item>
</channel>
</rss>