<?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>System Administration by Quags</title>
	<atom:link href="http://quags.net/feed" rel="self" type="application/rss+xml" />
	<link>http://quags.net</link>
	<description>My way</description>
	<lastBuildDate>Thu, 29 Mar 2012 19:24:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Adding AHCI to centos initrd</title>
		<link>http://quags.net/archives/77</link>
		<comments>http://quags.net/archives/77#comments</comments>
		<pubDate>Thu, 29 Mar 2012 19:24:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=77</guid>
		<description><![CDATA[Ever needed to add AHCI to a centos system after an install. A quick way to do it is just: modprobe ahci cp /boot/initrd-`uname -r`.img /boot/initrd-`uname -r`.img.bak mkinitrd -f --with=ahci /boot/initrd-`uname -r`.img `uname -r`]]></description>
			<content:encoded><![CDATA[<p>Ever needed to add AHCI to a centos system after an install. A quick way to do it is just:</p>
<pre>
modprobe ahci
cp /boot/initrd-`uname -r`.img /boot/initrd-`uname -r`.img.bak
mkinitrd -f --with=ahci /boot/initrd-`uname -r`.img `uname -r`
</pre>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/77/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cpanel + rrdtool not installing (new install)</title>
		<link>http://quags.net/archives/75</link>
		<comments>http://quags.net/archives/75#comments</comments>
		<pubDate>Sat, 24 Mar 2012 13:13:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=75</guid>
		<description><![CDATA[Frequently I came across new cpanel installs not installing rrdtool correctly. The error would end at Using catalogs: /etc/sgml/sgml-docbook-3.1-1.0-51.el6.cat Using stylesheet: /usr/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#print Working on: /usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0/doc/local-fontconfig-devel.sgml nsgmls:(invalid location):E: invalid filename "" rmdir: failed to remove `devel-man': Directory not empty gmake[2]: *** &#8230; <a href="http://quags.net/archives/75">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Frequently I came across new cpanel installs not installing rrdtool correctly. The error would end at</p>
<pre>
Using catalogs: /etc/sgml/sgml-docbook-3.1-1.0-51.el6.cat
Using stylesheet: /usr/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#print
Working on: /usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0/doc/local-fontconfig-devel.sgml
nsgmls:(invalid location):E: invalid filename ""
rmdir: failed to remove `devel-man': Directory not empty
gmake[2]: *** [func.refs] Error 1
gmake[2]: Leaving directory `/usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0/doc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0'
gmake: *** [all] Error 2
child exited with value 2
</pre>
<p>To fix run<br />
 yum remove docbook-utils<br />
 /scripts/rrdtoolinstall</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/75/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CloudLinux Single mode</title>
		<link>http://quags.net/archives/73</link>
		<comments>http://quags.net/archives/73#comments</comments>
		<pubDate>Sat, 24 Mar 2012 12:52:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=73</guid>
		<description><![CDATA[I&#8217;ve always had trouble getting into single mode in cloudlinux. Trying to type single would show up as gibberish. Looking at a server today, I accidentally came across a way around this, by hitting c (to go to the grub &#8230; <a href="http://quags.net/archives/73">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always had trouble getting into single mode in cloudlinux. Trying to type single would show up as gibberish. Looking at a server today, I accidentally came across a way around this, by hitting c (to go to the grub command line) and esc (to exit back). Once done I could use append (a). Previously append or edit did not work.</p>
<p>At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu.</p>
<p>type c (goes to grub command line) then hit esc</p>
<p>Select Cloud Linux with the version of the kernel that you wish to boot and type a to append the line.</p>
<p>type single and hit enter to boot </p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/73/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send exim on another IP address, for a specific domain</title>
		<link>http://quags.net/archives/69</link>
		<comments>http://quags.net/archives/69#comments</comments>
		<pubDate>Thu, 08 Mar 2012 18:52:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=69</guid>
		<description><![CDATA[I was looking for a way to send mail to one domain on an IP, and all other mail on another domain on another IP. The basic exim remote SMTP set up is remote_smtp: driver=smtp To switch the exim ip, &#8230; <a href="http://quags.net/archives/69">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was looking for a way to send mail to one domain on an IP, and all other mail on another domain on another IP. The basic exim remote SMTP set up is</p>
<p><code><br />
remote_smtp:<br />
   driver=smtp<br />
</code></p>
<p>To switch the exim ip, the interface=IP.address configuration is used. But I wanted to have email to a particular domain go over another IP address. I came up with</p>
<p> interface = ${if eq {$domain}{REMOTE.DOMAIN.COM} {IP.TO.SEND.FROM}{DEFAULT.IP} }</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/69/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenVZ Container Error</title>
		<link>http://quags.net/archives/66</link>
		<comments>http://quags.net/archives/66#comments</comments>
		<pubDate>Thu, 08 Mar 2012 18:49:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=66</guid>
		<description><![CDATA[Ran into an issue where an openvz container would start up, but the networking would not. Running in verbose mode I saw ifup-venet WARNING: Device list is empty After looking around, searching the web I could not come up with &#8230; <a href="http://quags.net/archives/66">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ran into an issue where an openvz container would start up, but the networking would not. Running in verbose mode I saw</p>
<p><strong>ifup-venet WARNING: Device list is empty</strong></p>
<p>After looking around, searching the web I could not come up with anything. Then I saw the container had an /etc/vz folder. Turned out vzctl had got installed by the user on the openvz container, breaking networking. Removing this and a restart fixed the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/66/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copy accounts from a reseller WHM with out the root password (automatically)</title>
		<link>http://quags.net/archives/59</link>
		<comments>http://quags.net/archives/59#comments</comments>
		<pubDate>Mon, 30 Jan 2012 21:22:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=59</guid>
		<description><![CDATA[I quickly wrote this script to easily run the backup process for all accounts of a reseller using WHM. This calls the backup process in cpanel for each account using the ftp/scp copy function. Once its done you need to &#8230; <a href="http://quags.net/archives/59">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I quickly wrote this script to easily run the backup process for all accounts of a reseller using WHM. This calls the backup process in cpanel for each account using the ftp/scp copy function. Once its done you need to manually restore accounts yourself in the folder you copied the accounts to. </p>
<p>An example to restore the account is something quick like</p>
<p> for i in *; do /scripts/restorepkg $i; done</p>
<p>Run the above command in the folder all the backup accounts were copied to.</p>
<p>The restore as well as the below script are best run in screen.</p>
<p>You need to manually create the domains file for the script below. You can do this by going to list accounts in WHM and at the bottom clicking the fetch csv option. Take all that data and create a file called domains on your server. Then run</p>
<p> cat domains | cut -d, -f1-3,10 | grep -v ^Domain, > domains2</p>
<p>This will format the file, calling in domains2 in a format the below script can use.</p>
<p>Script below, with instructions.</p>
<pre>
#!/bin/bash

# Quick script to copy accounts from another cpanel server, with the reseller (not root password)
# This is just logging into cpanel to run the generate a full cpmove backup function in WHM

##
# Requires
##

## 1) logging into an account with the reseller password
## 2) the backup function working
## 3) getting the csv from list accounts and putting it in the right format

##
# Getting the csv
##

# Log into WHM as the reseller and go to list accounts. At the botton click 'Fetch CSV'
# Save it on the server you are copying it to, and call it 'domains'
# Run the below command
#cat domains | cut -d, -f1-3,10 | grep -v ^Domain, > domains2

# This is the WHM Password (resller pass)
HTTPPASS=whmpassword

# This is the WHM IP (server with the accounts now)
SERVER=IP.TRANSFERING.FROM

# This is the Remote FTP Username (ftp username)
FTPUSER=FTPUSERNAME

# This is the remote FTP Password (ftp password)
FTPPASS=ftppass

# This is the remote FTP IP (ftp IP address where accounts are going to)
FTPSERVER=ftp.server.ip

# This is the email address that gets notifications when the full backup is complete (your email address, the @ is %40)
MYEMAIL="email%40domain.com"

# backup type, possibilities are
# ftp
# passiveftp
# scp
TYPE=ftp;

# Port your ftp or scp port
PORT=21

# remote dir, default is %2F which is blank
# for scp follow format of %2Fhome%2Fusername for /home/username
REMOTEDIR=%2F;

# Sleep time in seconds (setting this too low could cause may backup processes to run at once)
sleep=200;

# you don't need to run this as root, but you may need to define a HOME
export HOME=/root

if [ ! -f domains2 ]; then
 echo 'Domains file missing';
 exit;
fi
# there is no error checking, so double check the above

for i in $(cat domains2 | cut -d\, -f3); do
 THEME=`cat domains2 | grep ,$i, | cut -d, -f4 | grep -v ^#`;
 curl -u $i:$HTTPPASS -k "https://$SERVER:2083/frontend/$THEME/backup/dofullbackup.html?dest=$TYPE&#038;email=$MYEMAIL&#038;server=$FTPSERVER&#038;user=$FTPUSER&#038;pass=$FTPPASS&#038;port=$PORT&#038;rdir=$REMOTEDIR"
 echo "Finished $i, Sleeping"
 sleep $sleep
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/59/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 6.2 and libvirt startup issues</title>
		<link>http://quags.net/archives/53</link>
		<comments>http://quags.net/archives/53#comments</comments>
		<pubDate>Wed, 21 Dec 2011 16:08:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=53</guid>
		<description><![CDATA[After the centos 6.2 update I noticed libvirt was not running on some servers. Looking at the logs I found Starting libvirtd daemon: 10:35:16.697: 6933: info : libvirt version: 0.9.4, package: 23.el6_2.1 (CentOS BuildSystem &#60;http://bugs.centos.org&#62;, 2011-12-17-16:39:59, c6b4.bsys.dev.centos.org) 10:35:16.697: 6933: error &#8230; <a href="http://quags.net/archives/53">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After the centos 6.2 update I noticed libvirt was not running on some servers. Looking at the logs I found</p>
<p>Starting libvirtd daemon: 10:35:16.697: 6933: info : libvirt version: 0.9.4, package: 23.el6_2.1 (CentOS BuildSystem &lt;http://bugs.centos.org&gt;, 2011-12-17-16:39:59, c6b4.bsys.dev.centos.org)<br />
10:35:16.697: 6933: error : virNetServerMDNSStart:460 : internal error Failed to create mDNS client: Daemon not running</p>
<p>&nbsp;</p>
<p>Further investigation found avahi was needed for this to work. The final fix was running</p>
<p>&nbsp;</p>
<pre>
yum -y install avahi
/etc/init.d/messagebus restart
/etc/init.d/avahi-daemon restart
/etc/init.d/libvirtd restart
/sbin/chkconfig messagebus on
/sbin/chkconfig avahi-daemon on
</pre>
<p>In centos 6.2 restarting libvirt will not restart the vm&#8217;s. Once done libvirt was running again.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/53/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>OpenVZ and CentOS6</title>
		<link>http://quags.net/archives/46</link>
		<comments>http://quags.net/archives/46#comments</comments>
		<pubDate>Tue, 02 Aug 2011 18:18:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://quags.net/?p=46</guid>
		<description><![CDATA[I have been testing openvz on centos6 today, and following my normal config I installed software raid1. Everything went fine until a reboot into the centos kernel. On a reboot, I got an error &#160; dracut cannot find root, &#8220;sleeping &#8230; <a href="http://quags.net/archives/46">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been testing openvz on centos6 today, and following my normal config I installed software raid1. Everything went fine until a reboot into the centos kernel. On a reboot, I got an error</p>
<p>&nbsp;</p>
<p><strong>dracut cannot find root, &#8220;sleeping forever&#8221;</strong></p>
<p>&nbsp;</p>
<p>As an old school sysadmin I hate change, what is dracut I&#8217;m thinking (not to mention fstab has UUID&#8217;s instead of LABELs, looking like ubuntu now). This replaces the old initrd system. Ok it has a shell you can boot into rdshell which seems kind of cool. On to the fix I found.</p>
<p>I noticed that on openvz dracut never assembled raid1. I ran</p>
<p>dracut -f &#8211;add-drivers raid1 &#8211;mdadmconf /boot/initramfs-2.6.32-042stab024.1.img 2.6.32-042stab024.1</p>
<p>Which at the time was the stable kernel and rebooted. System is back up with out errors.</p>
<p>&nbsp;</p>
<p>You may need to run</p>
<p>mdadm &#8211;examine &#8211;scan</p>
<p>and update your /etc/mdadm.conf file</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/46/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CVE-2010-3856</title>
		<link>http://quags.net/archives/37</link>
		<comments>http://quags.net/archives/37#comments</comments>
		<pubDate>Sat, 23 Oct 2010 14:45:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://quags.net/?p=37</guid>
		<description><![CDATA[A new glibc exploit has been disclosed under CVE-2010-3856. Unlike the last glibc exploit a few days ago you do not get direct root access, but you can create files/dirs in root owned paths. I expect an update from RedHat &#8230; <a href="http://quags.net/archives/37">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A new glibc exploit has been disclosed under CVE-2010-3856. Unlike the last glibc exploit a few days ago you do not get direct root access, but you can create files/dirs in root owned paths. I expect an update from RedHat with in the next 24 &#8211; 48 hours.</p>
<p>I released a glibc update for the last glibc update in a testing repo. It looks like I will be keeping the testing repo for some time. Here is how to get the latest glibc update (a copy of my previous post)</p>
<p>-</p>
<p>Run <strong>/admin/updatefromtesting</strong> and there are glibc updates for CentOS 5.</p>
<p>You can get this by running</p>
<p><strong>/admin/upscripts</strong></p>
<p>If you do not have the admin scripts run</p>
<p><strong>rsync -a rsync://mirror.trouble-free.net/admin /admin</strong></p>
<p>Before use, you will need to run either</p>
<p><strong>ln -s /admin/testing.repo /etc/yum.repos.d/testing.repo</strong></p>
<p>or</p>
<p><strong>cp /admin/testing.repo /etc/yum.repos.d/testing.repo</strong></p>
<p>Then run</p>
<p><strong>/admin/updatefromtesting</strong></p>
<p>This repo is not enabled by default. So what is really happening is yum is being called as yum –enablerepo=tf-testing update</p>
<p>&#8211;</p>
<p>The testing repo will stay around for a bit longer. If you are a current InterServer customer please contact support.</p>
<p>I have tested this update on multiple i386 and x86_64 systems and have seemed it stable. However, using the testing repo is not an official update from RedHat or CentOS.</p>
<p>The repo, including srpm, is at http://mirror.trouble-free.net/tf/testing/5.5/</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/37/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CVE-2010-3847</title>
		<link>http://quags.net/archives/32</link>
		<comments>http://quags.net/archives/32#comments</comments>
		<pubDate>Wed, 20 Oct 2010 14:43:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://quags.net/?p=32</guid>
		<description><![CDATA[CVE-2010-3847 glibc root exploit <a href="http://quags.net/archives/32">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There is a new linux root exploit through glibc CVE-2010-3847. This exploit can be used to gain root access by a &#8220;local user&#8221;. Of course, being in the web hosting industry a local user can be an exploitable script, a customer, a php or cgi shell and on and on. Affected are RHEL and CentOS 5.</p>
<p>No glibc update has been released yet by RedHat.</p>
<p>I have released a new admin script and a testing repo on the InterServer yum repo. The admin script is <strong>/admin/updatefromtesting</strong> and there are glibc updates for CentOS 5.</p>
<p>You can get this by running</p>
<p><strong>/admin/upscripts</strong></p>
<p>If you do not have the admin scripts run</p>
<p><strong>rsync -a rsync://mirror.trouble-free.net/admin /admin</strong></p>
<p>Before use, you will need to run either</p>
<p><strong>ln -s /admin/testing.repo /etc/yum.repos.d/testing.repo</strong></p>
<p>or</p>
<p><strong>cp /admin/testing.repo /etc/yum.repos.d/testing.repo</strong></p>
<p>Then run</p>
<p><strong>/admin/updatefromtesting</strong></p>
<p>This repo is not enabled by default. So what is really happening is yum is being called as yum &#8211;enablerepo=tf-testing update</p>
<p>Future updates will not use this repo. In fact, I do not have plans on keeping the testing repo &#8211; we will see.</p>
<p>I expect the glibc update from redhat to apply over the testing repo. However this is glibc, so use at your own risks. If you are an InterServer customer contact support for help with this update.</p>
<p>I have tested the update on multiple servers and have build for i386 and x86_64.</p>
<p>The repo, including srpm, is at http://mirror.trouble-free.net/tf/testing/5.5/</p>
]]></content:encoded>
			<wfw:commentRss>http://quags.net/archives/32/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

