<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Linux Admininstration</title>
	<atom:link href="http://linadmin.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://linadmin.wordpress.com</link>
	<description>Services, Security and Whatnot</description>
	<lastBuildDate>Sat, 23 Jan 2010 00:18:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='linadmin.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Linux Admininstration</title>
		<link>http://linadmin.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://linadmin.wordpress.com/osd.xml" title="Linux Admininstration" />
	<atom:link rel='hub' href='http://linadmin.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Automate Restart of D-Link DCS-900 Cameras</title>
		<link>http://linadmin.wordpress.com/2010/01/18/automate-restart-of-d-link-dcs-900-cameras/</link>
		<comments>http://linadmin.wordpress.com/2010/01/18/automate-restart-of-d-link-dcs-900-cameras/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 16:21:39 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=114</guid>
		<description><![CDATA[I have some older D-Link DCS-900 cameras being used with ZoneMinder for a security system at home. While these cameras are normally very stable (no lock-ups for weeks or months at a time) it still happens. To make things work more smoothly, I decided to find a way to restart the devices with cron. I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=114&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have some older D-Link DCS-900 cameras being used with ZoneMinder for a security system at home.</p>
<p>While these cameras are normally very stable (no lock-ups for weeks or months at a time) it still happens. To make things work more smoothly, I decided to find a way to restart the devices with cron. </p>
<p>I decided to have the cameras be reset twice a month (on the 1st and 15th of each month at 4am).</p>
<blockquote><p>
<code><br />
crontab -e</p>
<p>0 4 1,15 * * wget --http-user=admin --http-password=YOUR-PASSWORD -O /dev/null --post-data="Reset= Yes " http://camera1/Reply.html</p>
<p></code>
</p></blockquote>
<p>You can remove the <strong>&#8211;http-user</strong> and <strong>&#8211;http-password</strong> sections if you do not have an admin user/password set. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=114&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2010/01/18/automate-restart-of-d-link-dcs-900-cameras/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 9.10 PXE Boot</title>
		<link>http://linadmin.wordpress.com/2009/11/16/ubuntu-9-10-pxe-boot/</link>
		<comments>http://linadmin.wordpress.com/2009/11/16/ubuntu-9-10-pxe-boot/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 16:23:06 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=93</guid>
		<description><![CDATA[Ubuntu 9.10 uses initrd.lz instead of initrd.gz, so PXE booting like you did in previous versions does not work. This article assumes you&#8217;ve already downloaded the iso and have a working PXE boot server. First, copy the contents of the iso to a directory we can work with mkdir /tmp/910 mount -o loop ubuntu-9.10-desktop-i386.iso /tmp/910 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=93&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 9.10 uses initrd.lz instead of initrd.gz, so PXE booting like you did in previous versions does not work.</p>
<p>This article assumes you&#8217;ve already downloaded the iso and have a working PXE boot server.</p>
<p>First, copy the contents of the iso to a directory we can work with</p>
<blockquote><p>
<code><br />
mkdir /tmp/910</p>
<p>mount -o loop ubuntu-9.10-desktop-i386.iso /tmp/910</p>
<p>cp -r /tmp/910 /tftpboot<br />
</code>
</p></blockquote>
<p>Convert initrd.lz to initrd.gz</p>
<blockquote><p>
<code><br />
cd /tftpboot/910/casper</p>
<p>mkdir initrd</p>
<p>cp initrd.lz initrd</p>
<p>cd initrd</p>
<p>lzma -dc -S .lz initrd.lz | cpio -id</p>
<p>rm initrd.lz</p>
<p>find . | cpio --quiet --dereference -o -H newc | gzip -9 &gt; initrd.gz</p>
<p>cp initrd.gz /tftpboot/910/casper<br />
</code>
</p></blockquote>
<p>Now add the appropriate lines to pxelinux (Example: /tftpboot/pxelinux.cfg/default)</p>
<blockquote><p>
<code><br />
LABEL Ubuntu 9.10 i386 Unmodified Livecd<br />
KERNEL 910/casper/vmlinuz<br />
APPEND root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.0.1:/home/tftpboot/910 initrd=910/casper/initrd.gz quiet splash --<br />
</code>
</p></blockquote>
<p>Make sure /tftpboot is shared via nfs; in /etc/exports add the following line</p>
<blockquote><p>
<code><br />
/tftpboot/910 192.168.0.0/24(rw,async,no_subtree_check)<br />
</code>
</p></blockquote>
<p>Reload the NFS server</p>
<p>/etc/init.d/nfs-kernel-server reload<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=93&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2009/11/16/ubuntu-9-10-pxe-boot/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenSolaris LDAP Client to Linux OpenLDAP Server</title>
		<link>http://linadmin.wordpress.com/2009/11/13/opensolaris-ldap-client-to-linux-openldap-server/</link>
		<comments>http://linadmin.wordpress.com/2009/11/13/opensolaris-ldap-client-to-linux-openldap-server/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 18:30:35 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Services]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=90</guid>
		<description><![CDATA[The following outlines how to set up a OpenSolaris client to work with a Linux OpenLDAP server. The following is one line ldapclient manual -a credentialLevel=proxy -a authenticationMethod=simple -a proxyDN=cn=admin,dc=server -a proxyPassword=yourpassword -a defaultSearchBase=dc=server -a defaultServerList=192.168.1.1:389 -a serviceSearchDescriptor=passwd:ou=People,dc=server -a serviceSearchDescriptor=group:ou=Groups,dc=server Add the following lines to their appropriate sections in /etc/pam.conf login   auth required           pam_ldap.so.1 other   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=90&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following outlines how to set up a OpenSolaris client to work with a Linux OpenLDAP server.</p>
<p>The following is one line</p>
<p style="padding-left:30px;">ldapclient manual -a credentialLevel=proxy -a authenticationMethod=simple -a proxyDN=cn=admin,dc=server -a proxyPassword=yourpassword -a defaultSearchBase=dc=server -a defaultServerList=192.168.1.1:389 -a serviceSearchDescriptor=passwd:ou=People,dc=server -a<br />
serviceSearchDescriptor=group:ou=Groups,dc=server</p>
<p>Add the following lines to their appropriate sections in /etc/pam.conf</p>
<p style="padding-left:30px;">login   auth required           pam_ldap.so.1<br />
other   auth required           pam_ldap.so.1<br />
passwd  auth required         pam_ldap.so.1</p>
<p>Test LDAP with</p>
<p style="padding-left:30px;">ldaplist -l passwd</p>
<p>Test user authentication using the following steps</p>
<p style="padding-left:30px;">mkdir /export/home/ldapuser</p>
<p style="padding-left:30px;">chown ldapuser /export/home/ldapuser</p>
<p>Edit /etc/auto_home and add the following BEFORE &#8220;+auto_home&#8221;</p>
<p style="padding-left:30px;">ldapuser localhost:/export/home/ldapuser</p>
<p>SSH to test</p>
<p style="padding-left:30px;">ssh ldapuser@localhost</p>
<p>You should be in! If not, you may have to change the following in /etc/ssh/sshd_config</p>
<p style="padding-left:30px;">PAMAuthenticationViaKBDInt no</p>
<p style="padding-left:30px;">#Change from yes to no</p>
<p>Restart SSH</p>
<p style="padding-left:30px;">svcadm restart ssh</p>
<p>If you are still unable to log in, your userPassword attribute probably needs to be changed from md5/md5crypt to crypt.</p>
<p style="padding-left:30px;">su &#8211; ldapuser</p>
<p style="padding-left:30px;">passwd</p>
<p>After changing your password you should be able to log in.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=90&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2009/11/13/opensolaris-ldap-client-to-linux-openldap-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
		<item>
		<title>View processes (PID) using disk I/O</title>
		<link>http://linadmin.wordpress.com/2009/07/28/view-processes-pid-using-disk-io/</link>
		<comments>http://linadmin.wordpress.com/2009/07/28/view-processes-pid-using-disk-io/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 13:22:06 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=85</guid>
		<description><![CDATA[Install the sysstat package apt-get install sysstat # iostat -m Linux 2.6.27-14-generic (slowaris)      07/28/2009      _x86_64_ avg-cpu:  %user   %nice %system %iowait  %steal   %idle 4.88    6.65    3.03    1.49    0.00   83.95 Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn md0             221.24         0.64         0.78    1765002    2159490 We can see that I/O isn&#8217;t terribly high here, but there are 221 transfers per [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=85&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Install the sysstat package</p>
<p style="padding-left:30px;">apt-get install sysstat</p>
<p style="padding-left:30px;"># iostat -m<br />
Linux 2.6.27-14-generic (slowaris)      07/28/2009      _x86_64_</p>
<p style="padding-left:30px;">avg-cpu:  %user   %nice %system %iowait  %steal   %idle<br />
4.88    6.65    3.03    1.49    0.00   83.95</p>
<p style="padding-left:30px;">Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn</p>
<p style="padding-left:30px;">md0             221.24         0.64         0.78    1765002    2159490</p>
<p>We can see that I/O isn&#8217;t terribly high here, but there are 221 transfers per second going on.</p>
<p>To check what processes are causing I/O</p>
<p style="padding-left:30px;">echo 1 &gt; /proc/sys/vm/block_dump</p>
<p style="padding-left:30px;">tail -f /var/log/syslog | grep md0</p>
<p style="padding-left:30px;">Jul 28 08:20:12 server kernel: [2752582.434647] kvm(17362): READ block 1017744552 on md0<br />
Jul 28 08:20:12 server kernel: [2752582.502401] kvm(17362): READ block 615283608 on md0<br />
Jul 28 08:20:13 server kernel: [2752582.634622] kvm(17362): READ block 1017744576 on md0<br />
Jul 28 08:20:14 server kernel: [2752583.964709] kvm(17362): READ block 1017744608 on md0<br />
Jul 28 08:20:14 server kernel: [2752584.372889] kvm(1868): dirtied inode 17367041 (live-default-32.img) on md0<br />
Jul 28 08:20:14 server kernel: [2752584.372908] kvm(1868): dirtied inode 17367041 (live-default-32.img) on md0</p>
<p>We see that kvm is causing some disk I/O; now where know where to start investigating!</p>
<p>To turn off these messages</p>
<p style="padding-left:30px;">echo 0 &gt; /proc/sys/vm/block_dump</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=85&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2009/07/28/view-processes-pid-using-disk-io/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenVZ on Ubuntu 8.10</title>
		<link>http://linadmin.wordpress.com/2009/07/14/openvz-on-ubuntu-8-10/</link>
		<comments>http://linadmin.wordpress.com/2009/07/14/openvz-on-ubuntu-8-10/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:32:43 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=78</guid>
		<description><![CDATA[Other OpenVZ Ubuntu 8.10 guides that I&#8217;ve seen have you use the old lenny repository; since this no longer exists let&#8217;s try another way! I used a 64-bit machine; steps will be the same for 32-bit. If you have 64-bit and just want to download the kernel I used: http://bbis.us/~will/openvz-ubuntu810.tar.gz Now let&#8217;s build the kernel. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=78&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Other OpenVZ Ubuntu 8.10 guides that I&#8217;ve seen have you use the old lenny repository; since this no longer exists let&#8217;s try another way!</p>
<p>I used a 64-bit machine; steps will be the same for 32-bit. If you have 64-bit and just want to download the kernel I used: http://bbis.us/~will/openvz-ubuntu810.tar.gz</p>
<p>Now let&#8217;s build the kernel.</p>
<p style="padding-left:30px;">cd /usr/src<br />
wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.tar.bz2<br />
tar xjf linux-2.6.27.tar.bz2<br />
cd linux-2.6.27</p>
<p style="padding-left:30px;">wget http://download.openvz.org/kernel/branches/2.6.27/2.6.27-briullov.1/patches/patch-briullov.1-combined.gz<br />
gunzip patch-briullov.1-combined.gz</p>
<p style="padding-left:30px;">wget http://download.openvz.org/kernel/branches/2.6.27/2.6.27-briullov.1/configs/kernel-2.6.27-x86_64.config.ovz<br />
#OR<br />
wget http://download.openvz.org/kernel/branches/2.6.27/2.6.27-briullov.1/configs/kernel-2.6.27-i686.config.ovz</p>
<p style="padding-left:30px;">cp kernel-2.6.27-*.config.ovz .config<br />
patch -p1 &lt; patch*</p>
<p style="padding-left:30px;">make oldconfig</p>
<p style="padding-left:30px;">make<br />
make modules_install install</p>
<p style="padding-left:30px;">cd /boot<br />
mkinitramfs -o /boot/initrd.img-2.6.27 2.6.27</p>
<p style="padding-left:30px;">vi /boot/grub/menu.lst</p>
<p style="padding-left:60px;">#Replace uuid entries with your disks uuid<br />
title           Ubuntu 8.10 OpenVZ 2.6.27<br />
uuid            2d5b2466-4bdf-44c7-b8e5-4d46a9f927c8<br />
kernel          /boot/vmlinuz-2.6.27 root=UUID=2d5b2466-4bdf-44c7-b8e5-4d46a9f927c8 ro quiet splash<br />
initrd          /boot/initrd.img-2.6.27<br />
quiet</p>
<p style="padding-left:30px;">grub-install /dev/sda</p>
<p style="padding-left:30px;">apt-get install vzctl vzquota</p>
<p style="padding-left:30px;">reboot</p>
<p>If everything went according to plan, you&#8217;ll boot into your new kernel. If you get a kernel panic, or things are not working as expected, you may have to</p>
<p style="padding-left:30px;">make menuconfig</p>
<p>Once the kernel is working, let&#8217;s create a container.</p>
<p style="padding-left:30px;">cd /var/lib/vz/private</p>
<p style="padding-left:30px;">mkdir 1</p>
<p style="padding-left:30px;">debootstrap hardy 1</p>
<p>When you see:</p>
<p style="padding-left:30px;">#I: Base system installed successfully.</p>
<p>You can continue.</p>
<p style="padding-left:30px;">vi /etc/vz/dists/default<br />
#Change redhat to debian OR copy ubuntu.conf to default</p>
<p>Create the container and set an IP</p>
<p style="padding-left:30px;">vzctl set 1 &#8211;applyconfig vps.basic &#8211;save<br />
vzctl set 1 &#8211;ipadd 192.168.100.7 &#8211;save<br />
vzctl set 1 &#8211;nameserver 192.168.100.1 &#8211;save</p>
<p style="padding-left:30px;">vzctl start 1</p>
<p>At this time you cannot enter the container. You will receive the error</p>
<p style="padding-left:30px;">Unable to open pty: No such file or directory</p>
<p>To fix this:</p>
<p style="padding-left:30px;">vzctl exec 1 update-rc.d -f udev remove</p>
<p>Restart and enter the container</p>
<p style="padding-left:30px;">vzctl restart 1</p>
<p style="padding-left:30px;">vzctl enter 1</p>
<p>If network doesn&#8217;t work add to /etc/sysctl.conf on server (not container):</p>
<p style="padding-left:30px;">net.ipv4.conf.default.forwarding=1<br />
net.ipv4.conf.all.forwarding=1</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=78&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2009/07/14/openvz-on-ubuntu-8-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 8.10 LDAP Server with TLS</title>
		<link>http://linadmin.wordpress.com/2009/07/08/ubuntu-8-10-ldap-server-with-tls/</link>
		<comments>http://linadmin.wordpress.com/2009/07/08/ubuntu-8-10-ldap-server-with-tls/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 13:58:00 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Services]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=73</guid>
		<description><![CDATA[This should also work with Ubuntu 9.04 apt-get install slapd ldap-utils libnss-ldap libpam-ldap migrationtools Much like Debian, we must perform an extra step to make our changes permanent. dpkg-reconfigure slapd Omit OpenLDAP server configuration? No DNS domain name: your-server Organization name: whatever Database backend to use: HDB Do you want the database to be removed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=73&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This should also work with Ubuntu 9.04</p>
<blockquote><p><code>apt-get install slapd ldap-utils libnss-ldap libpam-ldap migrationtools</code></p></blockquote>
<p>Much like Debian, we must perform an extra step to make our changes permanent.</p>
<blockquote><p><code>dpkg-reconfigure slapd</code></p></blockquote>
<blockquote><p><code>Omit OpenLDAP server configuration? No<br />
DNS domain name: your-server<br />
Organization name: whatever<br />
Database backend to use: HDB<br />
Do you want the database to be removed when slapd is purged? No<br />
Move old database? Yes<br />
Admin password: &lt;password&gt;<br />
Confirm: &lt;password&gt;<br />
Allow LDAPv2 protocol: No<br />
</code></p></blockquote>
<p>Now we will populate LDAP. You should probably add a temporary LDAP user for testing. After we populate LDAP we&#8217;ll remove it.</p>
<blockquote><p><code>adduser test<br />
cd /usr/share/migrationtools<br />
</code></p></blockquote>
<p>Edit migrate_common.ph and replace &#8220;padl.com&#8221; with your domain and dc=padl,dc=com with dc=YOUR,dc=DOMAIN</p>
<blockquote><p><code>./migrate_base.pl &gt; /tmp/base.ldif</p>
<p>./migrate_passwd.pl /etc/passwd /tmp/passwd.ldif</p>
<p>./migrate_group.pl /etc/group /tmp/group.ldif<br />
</code></p></blockquote>
<p>Remove the top section of /tmp/base.ldif</p>
<blockquote><p><code>dn: dc=dev<br />
dc: dev<br />
objectClass: top<br />
objectClass: domain</p>
<p></code></p></blockquote>
<p>Restart LDAP and add our information to LDAP</p>
<blockquote><p><code><br />
/etc/init.d/slapd restart</p>
<p>ldapadd -x -W -D 'cn=admin,dc=example,dc=net' &lt; /tmp/base.ldif<br />
ldapadd -x -W -D 'cn=admin,dc=example,dc=net' &lt; /tmp/passwd.ldif<br />
ldapadd -x -W -D 'cn=admin,dc=example,dc=net' &lt; /tmp/group.ldif<br />
</code></p></blockquote>
<p>To enable PAM I suggest</p>
<blockquote><p><code><br />
cd /tmp<br />
wget http://st0rage.org/files/pam.d.tar<br />
tar xf pam.d.tar -C /etc<br />
</code></p></blockquote>
<p>Alternativly, you can try the following Ubuntu specific method:</p>
<blockquote><p><code><br />
auth-client-config -t nss -p lac_ldap<br />
pam-auth-update ldap<br />
</code></p></blockquote>
<p>Please note that I was unable to change user passwords with &#8216;passwd&#8217; using this method.</p>
<p>Remove the test user</p>
<blockquote><p><code>userdel test</code></p></blockquote>
<p>Set up TLS Certificate</p>
<blockquote><p><code>mkdir /etc/ldap/ssl<br />
cd /etc/ldap/ssl</p>
<p>openssl req -new -nodes -out req.pem -keyout key.pem<br />
#No challenge password, leave empty<br />
openssl rsa -in key.pem -out new.key.pem<br />
openssl x509 -in req.pem -out ca-cert -req -signkey new.key.pem -days 9999<br />
mv new.key.pem server.pem<br />
cat ca-cert &gt;&gt; server.pem<br />
</code></p></blockquote>
<p>Enable TLS on server</p>
<blockquote><p><code>ldapmodify -x -D cn=admin,cn=config -W</code></p></blockquote>
<p>Paste in the following:</p>
<blockquote><p><code>dn: cn=config<br />
add: olcTLSCACertificateFile<br />
olcTLSCACertificateFile: /etc/ldap/ssl/server.pem<br />
-<br />
add: olcTLSCertificateFile<br />
olcTLSCertificateFile: /etc/ldap/ssl/server.pem<br />
-<br />
add: olcTLSCertificateKeyFile<br />
olcTLSCertificateKeyFile: /etc/ldap/ssl/server.pem<br />
</code></p></blockquote>
<p>Press ENTER a few times to finish modifying and then Control+C when you see:</p>
<blockquote><p><code>modifying entry "cn=config"</code></p></blockquote>
<p>Edit /etc/default/slapd and add</p>
<blockquote><p><code>SLAPD_SERVICES="ldap:/// ldaps:/// ldapi:///"</code></p></blockquote>
<p>Restart slapd</p>
<blockquote><p><code>/etc/init.d/slapd restart</code></p></blockquote>
<p>If it fails, try:</p>
<blockquote><p><code><br />
chown -R openldap /etc/ldap/ssl<br />
/etc/init.d/slapd restart<br />
</code></p></blockquote>
<p>Client configuration</p>
<blockquote><p><code>vi /etc/ldap.conf</p>
<p>uri ldaps://server<br />
port 636<br />
ssl start_tls<br />
ssl on<br />
tls_checkpeer no<br />
tls_cacertfile /etc/ldap/ssl/server.pem<br />
</code></p></blockquote>
<blockquote><p><code><br />
vi /etc/nsswitch.conf</p>
<p>passwd: compat ldap<br />
group: compat ldap<br />
shadow: compat ldap<br />
hosts: files dns<br />
networks: files<br />
protocols: db files<br />
services: db files<br />
ethers: db files<br />
rpc: db files<br />
netgroup: ldap</p>
<p></code></p></blockquote>
<p>Now test! Make sure to stop nscd if you&#8217;re using it</p>
<blockquote><p><code>/etc/init.d/nscd stop</code></p></blockquote>
<p>Test LDAP</p>
<blockquote><p><code>$ id test<br />
uid=1001(test) gid=1001(test) groups=1001(test)<br />
</code></p></blockquote>
<p>Remember to keep an eye on /var/log/auth.log if you run into any problems</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=73&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2009/07/08/ubuntu-8-10-ldap-server-with-tls/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
		<item>
		<title>Enable network virtio (Gigabit) in libvirt/kvm Virtual Machine Ubuntu 8.10</title>
		<link>http://linadmin.wordpress.com/2009/07/07/enable-network-virtio-gigabit-in-libvirtkvm-virtual-machine-ubuntu-8-10/</link>
		<comments>http://linadmin.wordpress.com/2009/07/07/enable-network-virtio-gigabit-in-libvirtkvm-virtual-machine-ubuntu-8-10/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 15:06:53 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=71</guid>
		<description><![CDATA[If you create a domain with virt-manager, it does not always add the appropriate &#8216;virtio&#8217; entry to the xml file for your VM. If this is the case, you will notice that network speeds on the VM will not break 10/100 speeds. To fix this, edit the xml file vi /etc/libvirt/qemu/vm.xml Make sure your network [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=71&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you create a domain with virt-manager, it does not always add the appropriate &#8216;virtio&#8217; entry to the xml file for your VM.</p>
<p>If this is the case, you will notice that network speeds on the VM will not break 10/100 speeds.</p>
<p>To fix this, edit the xml file</p>
<blockquote><p><code>vi /etc/libvirt/qemu/vm.xml</code></p></blockquote>
<p>Make sure your network block looks like this (keep your MAC address the same)</p>
<blockquote><p><code>&lt;interface type='network'&gt;<br />
&lt;mac address='00:16:36:0b:4c:9c'/&gt;<br />
&lt;source network='default'/&gt;<br />
&lt;model type='virtio'/&gt;<br />
&lt;/interface&gt;<br />
</code></p></blockquote>
<p>Shut down the VM and confirm it&#8217;s shut down</p>
<blockquote><p><code>virsh shutdown vm</code></p></blockquote>
<blockquote><p><code># virsh list<br />
Connecting to uri: qemu:///system<br />
Id Name                 State<br />
----------------------------------<br />
</code></p></blockquote>
<p>If you do not see your vm &#8220;running&#8221; you can proceed. If it&#8217;s still running you need to shut it down another way.</p>
<p>Update the xml definition</p>
<blockquote><p><code>virsh define /etc/libvirt/qemu/vm.xml</code></p></blockquote>
<p>Start the domain</p>
<blockquote><p><code>virsh start vm</code></p></blockquote>
<p>Log into the VM and test with a 1GB file</p>
<blockquote><p><code>dd if=/dev/zero of=/tmp/test bs=1M count=1000<br />
scp /tmp/test root@192.168.100.1:/tmp</code></p></blockquote>
<p>You should see transfer speeds above 11-12 megabytes/second.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=71&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2009/07/07/enable-network-virtio-gigabit-in-libvirtkvm-virtual-machine-ubuntu-8-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
		<item>
		<title>Apache2 hangs with &#8216;Digest: generating secret for digest authentication&#8217;</title>
		<link>http://linadmin.wordpress.com/2009/06/22/apache2-hangs-with-digest-generating-secret-for-digest-authentication/</link>
		<comments>http://linadmin.wordpress.com/2009/06/22/apache2-hangs-with-digest-generating-secret-for-digest-authentication/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 19:59:38 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=69</guid>
		<description><![CDATA[I&#8217;m running Apache2+SSL inside a libvirtd (kvm) Virtual Machine. After enabling SSL and trying to add another SSL site, apache should refuse to restart and the following error would show up in /var/log/apache2.log Digest: generating secret for digest authentication After doing some research, it turns out that the VM did not have enough entropy to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=69&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m running Apache2+SSL inside a libvirtd (kvm) Virtual Machine.</p>
<p>After enabling SSL and trying to add another SSL site, apache should refuse to restart and the following error would show up in /var/log/apache2.log</p>
<p style="padding-left:30px;">Digest: generating secret for digest authentication</p>
<p>After doing some research, it turns out that the VM did not have enough entropy to generate much of anything. Increasing this is easy, but may not be completely secure.</p>
<p style="padding-left:30px;"># cat /proc/sys/kernel/random/entropy_avail<br />
139</p>
<p style="padding-left:30px;"># apt-get install rng-tools</p>
<p style="padding-left:30px;"># rngd -r /dev/urandom -o /dev/random</p>
<p style="padding-left:30px;"># cat /proc/sys/kernel/random/entropy_avail<br />
2220</p>
<p>After running rngd, the entropy will increase at a gradual rate.</p>
<p>If you want this to survive a reboot, you&#8217;ll need to put it in a startup script.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=69&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2009/06/22/apache2-hangs-with-digest-generating-secret-for-digest-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
		<item>
		<title>Recover from accidental mkfs using fsck</title>
		<link>http://linadmin.wordpress.com/2009/06/13/recover-from-accident-mkfs-using-fsck/</link>
		<comments>http://linadmin.wordpress.com/2009/06/13/recover-from-accident-mkfs-using-fsck/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 18:15:41 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Issues]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=61</guid>
		<description><![CDATA[Recently I accidentally ran mkfs.ext3 on the wrong RAID1 array. As soon as I realized what had happened, I shut power off from the PC. Booting to a live CD, I ran mdadm &#8211;assemble /dev/md0 /dev/sda1 /dev/sdb1 fsck -y /dev/md0 I was able to then mount the drive mkdir /media/md0 mount /dev/md0 /media/md0 ls /media/md0/lost+found [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=61&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I accidentally ran mkfs.ext3 on the wrong RAID1 array.</p>
<p>As soon as I realized what had happened, I shut power off from the PC.</p>
<p>Booting to a live CD, I ran</p>
<p style="padding-left:30px;">mdadm &#8211;assemble /dev/md0 /dev/sda1 /dev/sdb1</p>
<p style="padding-left:30px;">fsck -y /dev/md0</p>
<p>I was able to then mount the drive</p>
<p style="padding-left:30px;">mkdir /media/md0</p>
<p style="padding-left:30px;">mount /dev/md0 /media/md0</p>
<p style="padding-left:30px;">ls /media/md0/lost+found</p>
<p>And the majority of my files were saved.</p>
<p>Check to see if your filesystem is ext2 or ext3</p>
<p style="padding-left:30px;">mount | grep md0</p>
<p>If it&#8217;s ext2, convert it to ext3</p>
<p style="padding-left:30px;">umount /media/md0</p>
<p style="padding-left:30px;">tune2fs -j /dev/md0</p>
<p style="padding-left:30px;">
<p><strong>WARNING</strong>: If you choose to run fsck manually (without -y), choosing &#8220;n&#8221; to Clear? and &#8220;y&#8221; to Fix? will cause you to lose that file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=61&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2009/06/13/recover-from-accident-mkfs-using-fsck/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
		<item>
		<title>Debian Corefiles</title>
		<link>http://linadmin.wordpress.com/2009/02/16/debian-corefiles/</link>
		<comments>http://linadmin.wordpress.com/2009/02/16/debian-corefiles/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 16:12:54 +0000</pubDate>
		<dc:creator>termina</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxadministration.us/?p=56</guid>
		<description><![CDATA[If you have any issues with programs segfaulting, it can be useful to allow coredumps in order to see what happened. You first have to allow coredumps vi /etc/security/limits.conf *  -  core  100000 @users  -  core  0 core is measured in kbytes, and core files can be fairly large (the simple script below generates a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=56&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you have any issues with programs segfaulting, it can be useful to allow coredumps in order to see what happened.</p>
<p>You first have to allow coredumps</p>
<p style="padding-left:30px;">vi /etc/security/limits.conf</p>
<p style="padding-left:30px;">*  -  core  100000</p>
<p style="padding-left:30px;">@users  -  core  0</p>
<p>core is measured in kbytes, and core files can be fairly large (the simple script below generates a 350kb file).  Do not set this to unlimited for regular users!</p>
<p style="padding-left:30px;">echo 1 &gt; /proc/sys/kernel/core_uses_pid</p>
<p style="padding-left:30px;">mkdir /tmp/core</p>
<p style="padding-left:30px;">echo &#8220;/tmp/core/dump&#8221; &gt; /proc/sys/kernel/core_pattern</p>
<p style="padding-left:30px;">ulimit -c 100000</p>
<p>To test it let&#8217;s create a script that will cause a coredump.</p>
<p style="padding-left:30px;">vi core_dump.sh</p>
<p style="padding-left:30px;">#!/bin/bash<br />
#core_dump.sh<br />
kill -s $$<br />
#end</p>
<p>chmod +x core_dump.sh<br />
./core_dump.sh</p>
<p>ls /tmp/cores</p>
<p>dump.14594 core_dump.sh</p>
<p style="padding-left:30px;">
<p>To view the corefile, you need gdb.</p>
<p style="padding-left:30px;">apt-get install gdb</p>
<p>gdb -c dump.13594</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linadmin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linadmin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linadmin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linadmin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linadmin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linadmin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linadmin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linadmin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linadmin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linadmin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linadmin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linadmin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linadmin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linadmin.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linadmin.wordpress.com&amp;blog=2592773&amp;post=56&amp;subd=linadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linadmin.wordpress.com/2009/02/16/debian-corefiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bce2c386c0af20cd95031ed16523b338?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">termina</media:title>
		</media:content>
	</item>
	</channel>
</rss>
