<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-34735857</id><updated>2011-11-27T16:10:11.472-08:00</updated><category term='Enters Domain biz'/><category term='postgresql'/><category term='Rebuilding RPM DB'/><category term='Howto links'/><category term='Renaming files'/><category term='I hate MicroSoft'/><category term='2.6.19.2'/><category term='FOSS.in 06'/><category term='Hot news'/><category term='BOSUG'/><category term='save $15'/><category term='Windows'/><category term='openvz'/><category term='RPM'/><category term='sed'/><category term='RPM hacks'/><category term='Belenix'/><category term='yum'/><category term='installed binary'/><category term='cPanel'/><category term='Linux jokes'/><category term='Linux boot process'/><category term='godaddy coupons'/><category term='XWindows'/><category term='Hypervm'/><category term='Solaris 10'/><category term='Apache'/><category term='Mail Quotas Mismatch'/><category term='Technical Quiz'/><category term='Quiz'/><category term='mod_limitipconn'/><category term='MySQL'/><category term='asking for password'/><category term='of a file'/><category term='httpd'/><category term='FOSS'/><category term='mailing list'/><category term='new coupons'/><category term='IT Quiz'/><category term='IIS'/><category term='Plesk'/><category term='MicroSoft'/><category term='Limit bandwidth'/><category term='godaddy'/><category term='ownership and permissions'/><category term='CyberQuiz'/><category term='OpenSolaris'/><category term='Youtube video'/><category term='OpenSolaris Quiz'/><category term='TV coverage'/><category term='integrity'/><category term='mbox to maildir conversion'/><category term='linux file deletion'/><category term='REQUEST_URI'/><category term='Bind'/><category term='custom encoding'/><category term='Cyber Quiz'/><category term='Dada mail'/><category term='Sorting IPs'/><category term='rm'/><category term='easy fix'/><category term='FOSS.in 2006'/><category term='support withdrawn'/><category term='restoring lists'/><category term='limit simultaneous connections'/><category term='forum'/><category term='Free web-based course'/><category term='rpm build'/><category term='unlink'/><category term='nameserver issues'/><category term='Sun Tutorials'/><category term='bash scripting'/><category term='Frontpage extensions'/><category term='cool rpm commands'/><category term='ZFS'/><category term='named'/><category term='vps'/><category term='debug'/><category term='Test your knowledge on OpenSolaris'/><category term='upgradation'/><category term='limit emails per hour'/><category term='Boot from USB'/><category term='web services'/><category term='Google'/><category term='fixing DBM formats'/><category term='Shell scripting'/><category term='FOSS.in'/><category term='Restoring original attributes'/><category term='Linux'/><category term='DaDaMail'/><category term='kernel'/><category term='mod_rewrite'/><category term='RPM recovery'/><category term='htaccess'/><category term='win 2k3'/><category term='failure'/><category term='vzquota'/><category term='Limiting apache connections per IP'/><category term='debugfs'/><title type='text'>Techo musings Unix Linux Hacks Tips, Technical Quiz, Reviews, Tutorials cPanel Plesk tips</title><subtitle type='html'>Here you will find Hacks, Tips, Quiz, Reviews and Tutorials : Unix hacks and Tips, Linux Hacks and Tips, VIM, cPanel tips and hacks, Plesk tips and a few hosting reviews.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34735857.post-3791096352144707127</id><published>2009-01-15T19:54:00.000-08:00</published><updated>2009-01-15T20:02:54.152-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='web services'/><title type='text'>Not enough server storage is available to process this command</title><content type='html'>Web service in windows was not running and error it was returning when restarting from Plesk control panel was that, "One or more dependencies failed to start".&lt;br /&gt;&lt;br /&gt;I am no windows expert, but I knew about the existence of HTTP SSL as a dependency for Web service. So tried restarting HTTP SSL which returned with the error,&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;Not enough server storage is available to process this command&lt;/span&gt;&lt;/blockquote&gt;which meant, either the harddrive is full or the memory usage is high. Hardrive was 90% free :-P which meant to me, it's memory. So aligned the usage as per the memory usage and killed the killer DLL exe, "svchost.exe" and that brought the web services back to normal.&lt;br /&gt;&lt;br /&gt;I didnt investigate further, but I hope the server is not compromised :-(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-3791096352144707127?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/3791096352144707127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=3791096352144707127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3791096352144707127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3791096352144707127'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2009/01/not-enough-server-storage-is-available.html' title='Not enough server storage is available to process this command'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-8181257512310253972</id><published>2009-01-10T23:25:00.000-08:00</published><updated>2009-01-11T00:08:17.465-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='httpd'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>How to start apache with debug level enabled and showing all the configurations it reads</title><content type='html'>How to start apache with debug level enabled and showing all the configurations it reads, there by showing each virtual host configurations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;httpd -e debug -k start -S -t&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;location of httpd may differ. It can be /usr/sbin/httpd or /usr/local/apache/bin/httpd . You know the control panels!! :D&lt;br /&gt;&lt;br /&gt;Enjoy!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-8181257512310253972?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/8181257512310253972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=8181257512310253972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8181257512310253972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8181257512310253972'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2009/01/how-to-start-apache-with-debug-level.html' title='How to start apache with debug level enabled and showing all the configurations it reads'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-7259331073154897046</id><published>2008-12-27T01:46:00.000-08:00</published><updated>2008-12-27T03:43:23.893-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Renaming files'/><title type='text'>Renaming multiple files in Linux or unix boxes</title><content type='html'>I thought it was simple to do this. But I couldn't get rename command to work. I tried several methods found in google, quoted below, but at last it was the for loop and the regexes which came to help.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To rename all the files in a folder to .bak extension&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;for i in `ls -l | awk '{print $9}'`; do mv $i $i.bak; done&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Simpler,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;       for i in `ls -1A` do mv $i $i.bak ; done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;rename 's/\.bak$//' *.bak&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Is said to remove the .bak extensions , though it didnt work for me.&lt;br /&gt;&lt;br /&gt;To change all upper case file name to lowercase try this&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;blockquote style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;&lt;span&gt;rename 'y/A-Z/a-z/' *&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;Below command did help me to remove the .bak extensions on a series of files in a folder.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;for f in *.bak ; do mv "$f" "${f%.bak}"; done&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-7259331073154897046?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/7259331073154897046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=7259331073154897046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7259331073154897046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7259331073154897046'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/12/renaming-multiple-files-in-linux-or.html' title='Renaming multiple files in Linux or unix boxes'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-7263946018094476934</id><published>2008-12-24T08:35:00.000-08:00</published><updated>2008-12-24T11:10:38.398-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='RPM recovery'/><category scheme='http://www.blogger.com/atom/ns#' term='yum'/><title type='text'>Recovering from corrupted RPM database</title><content type='html'>When accessing the yum command, the error we got  was similar to this.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;error: rpmdb: damaged header #67 retrieved -- skipping.&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;File "/usr/bin/yum", line 29, in ?&lt;br /&gt;  yummain.main(sys.argv[1:])&lt;br /&gt;File "/usr/share/yum-cli/yummain.py", line 82, in main&lt;br /&gt;  base.getOptionsConfig(args)&lt;br /&gt;File "/usr/share/yum-cli/cli.py", line 206, in getOptionsConfig&lt;br /&gt;  errorlevel=opts.errorlevel)&lt;br /&gt;File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 132, in doConfigSetup&lt;br /&gt;  self.conf = config.readMainConfig(startupconf)&lt;br /&gt;File "/usr/lib/python2.4/site-packages/yum/config.py", line 598, in readMainConfig&lt;br /&gt;  yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)&lt;br /&gt;File "/usr/lib/python2.4/site-packages/yum/config.py", line 667, in _getsysver&lt;br /&gt;  hdr = idx.next()&lt;br /&gt;StopIteration&lt;/blockquote&gt;&lt;br /&gt;Solution is straight enough, to repair the RPM database. So how do we repair the RPM database. The straight forward method is to, remove the /var/lib/rpm/__db* and the run&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;rpm --rebuilddb &lt;/span&gt;&lt;/blockquote&gt;I believe I discussed this issue earlier in this blog itself. But that didn't fix in the first go and had to reissue the command again. And that time it did fix it.&lt;br /&gt;&lt;br /&gt;Another solution to fix the issue is using the  db_dump and db_load from the db4-utils package. This process involve re-building master package metadata file  /var/lib/rpm/Packages&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;mv Packages Packages-BAKUP&lt;br /&gt;db_dump Packages-BAKUP | db_load Packages&lt;br /&gt;rpm -qa&lt;br /&gt;rpm --rebuilddb&lt;/span&gt;&lt;span style="font-family: monospace;"&gt;&lt;br /&gt;&lt;/span&gt;/usr/lib/rpm/rpmdb_verify Packages&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;That should fix it. Check out &lt;a href="http://people.redhat.com/berrange/notes/rpmrecovery.html"&gt;http://people.redhat.com/berrange/notes/rpmrecovery.html&lt;/a&gt; for yet another solution. Complicated and may not need it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-7263946018094476934?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/7263946018094476934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=7263946018094476934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7263946018094476934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7263946018094476934'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/12/recovering-from-corrupted-rpm-database.html' title='Recovering from corrupted RPM database'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-3119787174241997977</id><published>2008-12-20T17:54:00.000-08:00</published><updated>2008-12-20T18:41:36.875-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Plesk'/><title type='text'>Default Plesk Page on Windows machines</title><content type='html'>Issue was that the domain name was not in the Inetmgr (IIS configuration :-P)&lt;br /&gt;&lt;br /&gt;D:\Program Files\SWsoft\Plesk\admin\bin&gt;websrvmng.exe --reconfigure-vhost --vhos&lt;br /&gt;t-name=domainname.com&lt;br /&gt;The system cannot find the file specified. (COM Error 80070002) at add(photo.vis&lt;br /&gt;imaker.com, 219.220.243.241, D:\inetpub\vhosts\domainname.com.com\httpdocs\photo)&lt;br /&gt;&lt;br /&gt;resulted in the above error.&lt;br /&gt;&lt;br /&gt;Solution was to create a photo folder and run it again. It did fix the issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-3119787174241997977?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/3119787174241997977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=3119787174241997977' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3119787174241997977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3119787174241997977'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/12/default-plesk-page-on-windows-machines.html' title='Default Plesk Page on Windows machines'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-4181116280094777480</id><published>2008-12-11T18:56:00.000-08:00</published><updated>2008-12-11T19:05:05.204-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vps'/><category scheme='http://www.blogger.com/atom/ns#' term='Hypervm'/><title type='text'>Resetting Hypervm Slave password -  remote_authentication_failed</title><content type='html'>HyperVMs pass had to be reset on a slave server due to the "remote_authentication_failed" error when accessing the slave node in the slave server.&lt;br /&gt;&lt;br /&gt;If you are receiving this error, and when you can't reset the password on the slave server from hypervm, you can manually do this on the slave server using the following commands:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;lphp.exe ../bin/common/resetpassword.php slave 'put_your_pass_here'&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Now there will be situations where, you still not be able to do it. In this situation, get the slave password from the master node, by logging to shell and then entering these commands there&lt;br /&gt;&lt;br /&gt;ls -l /usr/bin/hypervmdb&lt;br /&gt;&lt;br /&gt;Make sure that it is having 755 permissions. Or else give it.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;echo "select nname, realpass from pserver" |  hypervmdb&lt;/blockquote&gt;&lt;br /&gt;It will show you a output similar to&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;nname    realpass&lt;br /&gt;localhost    ~password1&lt;br /&gt;66.14.29.130    !pass2&lt;br /&gt;9.212.25.156    !pass3&lt;br /&gt;23.1.142.215    +pass4&lt;br /&gt;141.22.16.203     !pass5&lt;br /&gt;212.121.45.109    pass6&lt;/blockquote&gt;&lt;br /&gt;Take the pass from that list and reset the password using the command I mentioned above (ofcourse in slave). It should work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-4181116280094777480?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/4181116280094777480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=4181116280094777480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4181116280094777480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4181116280094777480'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/12/resetting-hypervm-slave-password.html' title='Resetting Hypervm Slave password -  remote_authentication_failed'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-8365350175344118017</id><published>2008-09-23T01:43:00.000-07:00</published><updated>2008-09-23T01:50:52.281-07:00</updated><title type='text'>Finding spammers in the Plesk server having mailenable as mail server</title><content type='html'>Yup. Finding spammers in the Plesk server having mailenable as mail server is a easy(?) task, if you know what you are doing. I am never a good windows admin, but I understand something. Often now a days, I find windows permissions to be more cumbersome than Linux, making me using the Sysinternal's (now Microsoft's) swiss knife tools every time.&lt;br /&gt;&lt;br /&gt;So here the issue was that, my client was not able to identify the spammer. I enabled Debugging (which was off) and then logging level was increased. &lt;br /&gt;&lt;br /&gt;regedit and went to the below location to add a debug logging level.&lt;br /&gt;&lt;br /&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Mail Enable\Mail Enable\Connectors\SMTP]&lt;br /&gt;"Debug Logging Level"=dword:0000000a &lt;br /&gt;&lt;br /&gt;And finally disabled the admin user of the default domain in mailenable. They were sending 1 email per 10 secs and that that details logging helped. Confirmed from mailenable.msc -&gt; System -&gt; localhost -&gt; Connectors -&gt; SMTP -&gt; queue&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-8365350175344118017?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/8365350175344118017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=8365350175344118017' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8365350175344118017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8365350175344118017'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/09/finding-spammers-in-plesk-server-having.html' title='Finding spammers in the Plesk server having mailenable as mail server'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-7863629726896571320</id><published>2008-09-21T02:47:00.000-07:00</published><updated>2008-09-21T02:51:32.974-07:00</updated><title type='text'>cPanel postgresql update sql statements</title><content type='html'>A Update statement from a postgresql db user created from the cpanel interface will result in an error similar to below.&lt;br /&gt;&lt;br /&gt;Warning: pg_query() [function.pg-query]: Query failed: ERROR: permission denied for relation listing in /home/username/public_html/pg_error.php on line 4&lt;br /&gt;&lt;br /&gt;The only solutions (may be due to security aspects) available now, if you dont want to login as postgresql user and give the user more permissions is to use the cpanel username and password to update the database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-7863629726896571320?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/7863629726896571320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=7863629726896571320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7863629726896571320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7863629726896571320'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/09/cpanel-postgresql-update-sql-statements.html' title='cPanel postgresql update sql statements'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-4522417594554085026</id><published>2008-08-20T09:52:00.000-07:00</published><updated>2008-08-20T09:59:05.713-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Plesk'/><category scheme='http://www.blogger.com/atom/ns#' term='win 2k3'/><category scheme='http://www.blogger.com/atom/ns#' term='asking for password'/><title type='text'>Plesk Windows 2003 - One website asking for password</title><content type='html'>This post is actually associated with the last post I made. But instead of editing the last post, I decided to go with a new post, since the issue happened before. After I change the password of an account, website on accessing on a browser, keeps on asking for username and password. It can be fixed by executing the following command from the cd %plesk_bin% directory.&lt;br /&gt;&lt;br /&gt;websrvmng --update-anon-password --domain-name=domainname.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-4522417594554085026?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/4522417594554085026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=4522417594554085026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4522417594554085026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4522417594554085026'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/08/plesk-windows-2003-one-website-asking.html' title='Plesk Windows 2003 - One website asking for password'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-8558234185623553999</id><published>2008-08-20T02:50:00.000-07:00</published><updated>2008-08-20T02:57:24.730-07:00</updated><title type='text'>Plesk Windows 2003 - 530 FTP user cannot login</title><content type='html'>Plesk Windows 2003 - 530 User username cannot log in. A plesk user after a server move was not able to log in. &lt;br /&gt;&lt;br /&gt;My first attempt was to change the password which resulted in the error as below&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Error: Unable to activate/deactivate domain: User or role 'username2' does not exist in this database.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;As you can see that didn't fix the issue. Now I went on to change the username which resulted in the below error&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Error: Unable to update hosting preferences: Unable to rename FTP user: ftpmng --rename-user failed: User "username1" doesn't exist&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;So that put me in the track. Before entering to the plesk database and manually updating it on, I gave it a try to use the following command (which worked!) and saved me from further hassles.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight:bold;"&gt;"%plesk_bin%\ftpmng.exe" --reconfigure-all&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-8558234185623553999?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/8558234185623553999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=8558234185623553999' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8558234185623553999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8558234185623553999'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/08/plesk-windows-2003-530-ftp-user-cannot.html' title='Plesk Windows 2003 - 530 FTP user cannot login'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-8912424172025956646</id><published>2008-08-19T10:55:00.001-07:00</published><updated>2008-08-19T11:07:50.589-07:00</updated><title type='text'>IIS 6.0 ASP or ASP.NET 404 Page Not found error</title><content type='html'>First of all, before telling about the issue, let me apologize to the blogger god for blogging about Windows issues too, on a Unix only blog. I currently support a windows client as well. It is a learning process and I must say that I am enjoying that too.&lt;br /&gt;&lt;br /&gt;Okay the issue was this&lt;br /&gt;&lt;br /&gt;I am moving a domain from a Plesk 7.6 installed server to Plesk 8.4 installed server - a relatively new one. Everything except the domain contents are moving. I didn't try to fix at the source. Instead I tarred the httpdocs and moved to the new server and extracted it there. And there began the permission issue, as expected.&lt;br /&gt;&lt;br /&gt;Issues&lt;br /&gt;--------&lt;br /&gt;&lt;br /&gt;* Permission issue was making the website to ask for the password. Ran the Plesk permission fix from the Plesk reconfigurator and it did fix the issue. &lt;br /&gt;&lt;br /&gt;* Once that permission was fixed, came another issue which was returning 404 on a asp page which is actually there. I asked the Sergey's google, but it was saying many things but all answers were addressing the serverwide issues, like Allowing the ASP in Web Service Extension and so on, which was already enabled. &lt;br /&gt;&lt;br /&gt;My issue was domain specific. So had to do something with the IIS and the website in specific. Made sure that it had permissions for all users, just as any other website. So not any permission issue. And after two hours of scratching, I found that it was because there was nothing configured to process the files with .asp extension. &lt;br /&gt;&lt;br /&gt;Steps to follow is this&lt;br /&gt;&lt;br /&gt;1. Start -&gt; Run -&gt; inetmgr&lt;br /&gt;2. Websites -&gt; domain.com -&gt; Right Click permissions&lt;br /&gt;3. Home Directory --&gt; Application Settings --&gt; Configuration&lt;br /&gt;3. Add -&gt; Executable -&gt; C:\WINDOWS\System32\inetsrv\asp.dll and LIMIT the verbs to GET,HEAD,POST,TRACE. &lt;br /&gt;&lt;br /&gt;And voila that fixed the issue. Now some database connectivity is missing. Let me go back and work on that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-8912424172025956646?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/8912424172025956646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=8912424172025956646' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8912424172025956646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8912424172025956646'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/08/iis-60-asp-or-aspnet-404-page-not-found.html' title='IIS 6.0 ASP or ASP.NET 404 Page Not found error'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-1524717711170780390</id><published>2008-06-19T22:35:00.000-07:00</published><updated>2008-06-19T22:44:02.715-07:00</updated><title type='text'>cPanel compiling apache - No method to auto repair package system</title><content type='html'>My friends who use cPanel as their control panel, let me advise you first and foremost, don't use WHM to do sysadmin tasks. It will mess up the system once in a while and will leave you in dark. Similar situation happened with my friend, who was trying to compile PHP enabling the experimental PDO support through WHM. It messed up and all he could see was &lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;!! No method to auto repair package system !!&lt;br /&gt;&lt;br /&gt;!! Please visit http://www.cpanel.net/support/could_not_ensurepkgs.htm for help with this error. !!&lt;br /&gt;&lt;br /&gt;!! Restoring original working apache !! &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Apache stopped working. Examined a bit around 15 minutes to find out the solution. I was blindly looking around the httpd.conf and other similar configuration. But it was when I ran /scripts/easyapache, I could sniff the issue. &lt;br /&gt;&lt;br /&gt;cPanel was not able to update the packages and problem lied in the yum updating the PDO package.A "ps -auxww | grep yum" told me the same. Process was having the status of T (or stopped). I continued the process by passing the signal 18 to it and everything and niffy after that "kill -18 PID"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-1524717711170780390?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/1524717711170780390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=1524717711170780390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1524717711170780390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1524717711170780390'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/06/cpanel-compiling-apache-no-method-to.html' title='cPanel compiling apache - No method to auto repair package system'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-5813851240615552035</id><published>2008-05-02T22:46:00.000-07:00</published><updated>2008-05-02T23:17:29.918-07:00</updated><title type='text'>SFTP and the Received message too long 1534226287 in a VPS</title><content type='html'>One of my clients, whom I act as a trainer and an admin, had an issue recently regarding the sftp. He created a vps (Lxlabs' HyperVM) named testvm with vpsid 120. The main hardware node IP be 192.168.0.1 . And the VPS IP be 192.168.0.101. He was trying to sftp testvm@192.168.0.1.&lt;br /&gt;&lt;br /&gt;sftp testvm@192.168.0.1 was failing giving the message "Received message too long 1534226287" ; &lt;br /&gt;&lt;br /&gt;It was a bit confusing for me, since it was a VPS and the shell assigned was /usr/bin/lxopenvz and I was not sure of the proper rc file it reads before switching the control to the vps. All I know was the shell is not verifying whether the $TERM is dump or not. And &lt;span style="font-weight:bold;"&gt;1534226287&lt;/span&gt; was translated to &lt;span style="font-weight:bold;"&gt;[roo&lt;/span&gt; (Decimal --&gt; HEX --&gt; ASCII)&lt;br /&gt;&lt;br /&gt;So it was PS1 which is polluting the sftp stream. Spent 1 hour or so figuring out how to make it check the value of $TERM. And it was then I thought of trying the sftp root@192.168.0.101 (the VPS IP) and that worked. haha.. &lt;br /&gt;&lt;br /&gt;Client only needed to sftp to the VPS. He was not specific about sftping to  root@VPS_IP or testvm@HN_IP. Spent one hour for just because of my absent mindedness. I should be more smart :-P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-5813851240615552035?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/5813851240615552035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=5813851240615552035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5813851240615552035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5813851240615552035'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/05/sftp-and-received-message-too-long.html' title='SFTP and the Received message too long 1534226287 in a VPS'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-4312210464688508243</id><published>2008-01-21T07:45:00.000-08:00</published><updated>2008-01-21T07:59:20.295-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IT Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='Cyber Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='Technical Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='CyberQuiz'/><title type='text'>CyberQuiz aka IT quiz</title><content type='html'>Quizzing again.. A few information on IT industry in quiz format.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is Wikiality.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;It is an Internet Encyclopedia dedicated to the Honorable Professor Dr. Stephen T Colbert, D.F.A and his creation truthiness&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;With which cyber major has Mayo Clinic set up a collaborative research facility "The Medical Imaging Informatics Innovation Centre (MI3C)" to improve the quality of patient care ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;IBM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is 'Stevenote' ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;The colloquial term used for the keynote speeches by Steve Jobs, generally given at Apple events&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Name the former CTO of the One Laptop Per Child Foundation who has started a new company called Pixel Qi to commercialize the technology for low priced laptops for poor children&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Mary Lou Jepsen&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;With whom is Google jointly developing televisions that display internet content such as photos and videos&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Panasonic&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Who developed Postscript in 1985&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Adobe&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What 'spider' term is used for "the use of a table or structured list of URLs for Web sites (or words that hyperlink to Web sites) in order to help locate them ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Arachnotaxis&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The BlackBerry Pearl 8100 won the first BlackBerry to do way with what ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;A trackwheel. It was replaced by a miniature trackball.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What does Wikipedia define as "the act of taking a task traditionally performed by an employee or contractor and outsourcing it to an undefined generally large group of people in the form if an open call"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Crowdsourcing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;In the context off spam what is spinging&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;Pinging from a splog to make recipients think that content of interest has been updated though that may not be the case.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-4312210464688508243?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/4312210464688508243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=4312210464688508243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4312210464688508243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4312210464688508243'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/01/cyberquiz-aka-it-quiz.html' title='CyberQuiz aka IT quiz'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-3462811666089739032</id><published>2008-01-17T10:57:00.000-08:00</published><updated>2008-01-17T11:19:36.705-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unlink'/><category scheme='http://www.blogger.com/atom/ns#' term='rm'/><category scheme='http://www.blogger.com/atom/ns#' term='vzquota'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='linux file deletion'/><category scheme='http://www.blogger.com/atom/ns#' term='openvz'/><category scheme='http://www.blogger.com/atom/ns#' term='debugfs'/><title type='text'>Where all standard deletion fails...</title><content type='html'>Long time, since I updated the blog eh ? A good..a bit challenging one, till I remembered the command, debugfs. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Issue&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Location : One of my clients' VPS.&lt;br /&gt;Concern : One of his vps clients is not restarting properly. Stucks at initializing the vzquota. Error message when doing 'vzctl start 738' is below&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Starting VE ...&lt;br /&gt;Initializing quota ...&lt;br /&gt;vzquota : (error) quota check : lstat `photos.friendster.comphotos6968532886961_494183449s.jpg': No such file or directory&lt;br /&gt;vzquota init failed [1]&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Diagnosis&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I couldn't find any files with the name photos.friendster.comphotos6968532886961_494183449s.jpg inside the vps, or when looking at /vz/private/738. Then did a &lt;br /&gt;&lt;br /&gt;find . -name "*494183449s.jpg" inside the /vz/private/738. It returned me location as ./.trash/lsm/photos.friendster.comphotos6968532886961_494183449s.jpg&lt;br /&gt;&lt;br /&gt;/me so happy. Ran &lt;blockquote&gt;rm -f ./.trash/lsm/photos.friendster.comphotos6968532886961_494183449s.jpg&lt;/blockquote&gt; worked fine. But the problem persisted . Reason was though it didnt give any errors, it actually didnt delete the file. Ran a ls -l inside the directory lsm which showed output where it was question marks everywhere except for the name. AFAIK, name of a file is also stored in the directory info in the FS. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@vpsit lsm]# ls -l&lt;br /&gt;total 0&lt;br /&gt;?--------- ? ? ? ?            ? photos.friendster.comphotos6968532886961_494183449s.jpg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So how can I fix this and make the vps start ? "rm -f filename" was not working..  neither a bigger command, "find . -exec rm -rf {} \;" nor even rm -rf /.trash or rm -rf /.trash/lsm. The directory delete was not working, since it was not empty. Tried unlink also.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@vpsit lsm]# find . -exec rm -f {} \;&lt;br /&gt;rm: cannot remove `.' or `..'&lt;br /&gt;find: ./photos.friendster.comphotos6968532886961_494183449s.jpg: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then tried to turn off quota for vps ..so executed the vzquota off command and got the o/p as below&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;vzquota off 738&lt;br /&gt;vzquota : (error) Can't open quota file for id 738, maybe you need to reinitialize quota: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So didnt want to initialize the quota by command, since it wont work for sure, just as in case when it starts the vps. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Temporary fix:&lt;/span&gt; turn off disk_quota parameter in /etc/sysconfig/vz and started the vps. Turned on the parameter later.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Permanent fix:&lt;/span&gt; you can't use fsck to fix this, on a live server. Not when you have to run the fsck in / itself. So fsck was not an option here. So next choice went to debugfs&lt;br /&gt;&lt;br /&gt;here is what I did with debugfs&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;debugfs -w /dev/hda1&lt;br /&gt;cd /vz/private/738/.trash/&lt;br /&gt;unlink lsm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;gone..and the issue is fixed. I dont see a proper solution anywhere in web for this ???? question marked cases of file deletion and hence this post. &lt;br /&gt;&lt;br /&gt;I am tired of freelancing. Need to find some salaried job..Till next time..cya..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-3462811666089739032?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/3462811666089739032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=3462811666089739032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3462811666089739032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3462811666089739032'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2008/01/where-all-standard-deletion-fails.html' title='Where all standard deletion fails...'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-4812679442823738369</id><published>2007-12-10T03:39:00.000-08:00</published><updated>2007-12-10T03:41:39.537-08:00</updated><title type='text'>hypervm errors. Zend error</title><content type='html'>Failed loading /usr/local/lxlabs/ext/lib/Zend/lib/Optimizer-2.5.7/php-5.2.x/ZendOptimizer.so:  /usr/local/lxlabs/ext/lib/Zend/lib/Optimizer-2.5.7/php-5.2.x/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied&lt;br /&gt;&lt;br /&gt;Okay that was the message which I got during the hypervm stop. And the solution..&lt;br /&gt;&lt;br /&gt;Simplest solution was to disable selinux. But proper solution can be using chcon to change the context&lt;br /&gt;&lt;br /&gt;chcon -t texrel_shlib_t /usr/local/lxlabs/ext/lib/Zend/lib/Optimizer-2.5.7/php-5.2.x/ZendOptimizer.so&lt;br /&gt;chcon "user_u:object_r:httpd_sys_content_t" /usr/local/lxlabs/ext/lib/Zend/lib/Optimizer-2.5.7/php-5.2.x/ZendOptimizer.so&lt;br /&gt;&lt;br /&gt;should fix it.. I havent confirmed but hopefully proper solution will work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-4812679442823738369?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/4812679442823738369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=4812679442823738369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4812679442823738369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4812679442823738369'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/12/hypervm-errors-zend-error.html' title='hypervm errors. Zend error'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-2858217215795285119</id><published>2007-12-04T21:46:00.000-08:00</published><updated>2007-12-08T07:09:26.728-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cyber Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='Technical Quiz'/><title type='text'>Technical Quiz a.k.a Cyber Quiz</title><content type='html'>I am hereby starting a series of Quizing sessions to test yours and improving my knowledge, which I left updating since the last 3 years. These quizzes are not compiled by me, instead took from various sources, online and print. At a time the number of questions, wont exceed a max of 20.&lt;br /&gt;&lt;br /&gt;So there you go, hovering the mouse over the Answer will give you the answers&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;What is Google's open operating system for mobile phones called ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="Android"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Which telecom major is the biggest stakeholder in Symbian Ltd?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="Nokia"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; &lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is 'zoo' in context of security ?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="The collection of viruses and worms that exist only in virus and antivirus labs"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;Nigel Clifford is the CEO of .... ?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="Symbian Ltd"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;  &lt;br /&gt; &lt;/li&gt;&lt;li&gt;Who has Peter Dengate Thrush replaced as the Chairman of ICANN ?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="The legendary father of internet, Vinton Cerf"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;What was founded in July 1990 by Mitch Kapor, John Gilmore, and John Perry Barlow ?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="The Electronic Frontier Foundation"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;The graphics Processing Unit used in Nintendo's Wii video fame console is called ... ?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="Hollywood"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;What in the context of Linux is "bash"&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="Bash - Bourne Again SHell - The bourne shell used in Linux and other GNU OSes"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;The maximum packet length of IP, including the IP header is ........................ bytes&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="65535"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is 'Wardriving' ?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span title="Searching for Wi-Fi Wireless networks by a person in a moving vehicle while using a Wi-Fi-equipped computer"&gt;Answer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-2858217215795285119?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/2858217215795285119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=2858217215795285119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/2858217215795285119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/2858217215795285119'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/12/technical-quiz-aka-cyber-quiz.html' title='Technical Quiz a.k.a Cyber Quiz'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-3354304837157889006</id><published>2007-11-25T01:46:00.000-08:00</published><updated>2007-11-25T01:49:26.901-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='sed'/><title type='text'>Multiline search and replace using sed</title><content type='html'>I had to code in to remove a host entry from hosts.cfg file of nagios. Here is a bit of superb code to do so..&lt;br /&gt;&lt;br /&gt;sed '/#/{:a;N;/\}/!ba;/212.217.202.112/s/#.*\}//;}' hosts.cfg&lt;br /&gt;&lt;br /&gt;That will remove the entire block starting with "# '212.217.202.112' host definition" and ending in "}"&lt;br /&gt;&lt;br /&gt;Obfuscated code eh ? Not so..learn about registers in sed!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-3354304837157889006?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/3354304837157889006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=3354304837157889006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3354304837157889006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3354304837157889006'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/11/multiline-search-and-replace-using-sed.html' title='Multiline search and replace using sed'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-8053908902326832538</id><published>2007-05-20T22:15:00.000-07:00</published><updated>2007-05-20T22:19:24.071-07:00</updated><title type='text'>How to remove the mails from exim mail queue based on certain keywords ( cPanel specific )</title><content type='html'>How to remove the mails from exim mail queue based on certain keywords, especially in a cPanel. Below command will help in that and is for cPanel server. Matter of seconds for a seasoned admin, but posting so that I can copy and paste in future.&lt;br /&gt;&lt;br /&gt;find /var/spool/exim/input -type f | xargs grep -l 'search_keywords' | xargs rm -frv&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-8053908902326832538?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/8053908902326832538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=8053908902326832538' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8053908902326832538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/8053908902326832538'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/05/how-to-remove-mails-from-exim-mail.html' title='How to remove the mails from exim mail queue based on certain keywords ( cPanel specific )'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-5490638846213326050</id><published>2007-05-02T00:33:00.000-07:00</published><updated>2007-05-02T00:40:11.089-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mod_rewrite'/><category scheme='http://www.blogger.com/atom/ns#' term='REQUEST_URI'/><category scheme='http://www.blogger.com/atom/ns#' term='forum'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>mod_rewrite and REQUEST_URI</title><content type='html'>Yesterday I did a forum move , a SMF forum. We had to move the forum URL from http://www.domain.com/forum to http://www.domain.com along with moving the servers, but still not losing the links spidered by Google. So things had to be achieved by mod_rewrite and the below rewrite rule helped.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;RewriteEngine on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;RewriteCond %{REQUEST_URI} ^/forum/(.*)$ [NC]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;RewriteRule ^forum/(.*)$ /$1 [R=301,L]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What this will do is redirect&lt;br /&gt;&lt;br /&gt;http://www.domain.com/forum/index.php?PHPSESSID=0aj813j131434061699fb61eef295f&lt;br /&gt;to&lt;br /&gt;http://www.domain.com/index.php?PHPSESSID=0aj813j131434061699fb61eef295f&lt;br /&gt;&lt;br /&gt;Praise the mod_rewrite authors !!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-5490638846213326050?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/5490638846213326050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=5490638846213326050' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5490638846213326050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5490638846213326050'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/05/modrewrite-and-requesturi.html' title='mod_rewrite and REQUEST_URI'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-2787168037200722158</id><published>2007-05-01T23:15:00.000-07:00</published><updated>2007-05-02T00:17:39.896-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='htaccess'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>Forcing the files to be downloaded</title><content type='html'>Many of us have had to face the issue of making an txt file or .php file downloaded instead of the webserver parsing it and the browser displaying it. A simple entry as below in .htaccess and sometimes in your virtualhost section of httpd.conf can get this done.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   &lt;filesmatch&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        Header add Content-Disposition "Attachment"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; &lt;/filesmatch&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-2787168037200722158?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/2787168037200722158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=2787168037200722158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/2787168037200722158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/2787168037200722158'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/05/forcing-files-to-be-downloaded.html' title='Forcing the files to be downloaded'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-939005514329640963</id><published>2007-04-29T18:54:00.000-07:00</published><updated>2007-04-29T19:47:09.244-07:00</updated><title type='text'>semget: No space left on device</title><content type='html'>2 long months of no technical blogging..I have seen and gone through many issues , but hardly remembered about this blog :-(&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Situation:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Restarting httpd works for port 80, but fails for 443 (SSL port). I confirmed it with a telnet localhost 443, which returned me connection refused error. Apache error log along with informational messages, was returning me,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;semget: No space left on device&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To understand that is all because of semaphores getting build up and not being cleared properly. So we need to forcefully remove them.&lt;br /&gt;&lt;br /&gt;Stop httpd. and issue the following command,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ipcs | grep nobody | awk '{print $2}' &gt; clear.txt&lt;br /&gt;for i in `cat clear.txt`; do { ipcrm -s $i; }; done;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And finally restart httpd. Please note that in the above command I used nobody to grep in ipcs, but in your case it can be apache or www or even www-data. But you know the drill!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-939005514329640963?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/939005514329640963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=939005514329640963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/939005514329640963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/939005514329640963'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/04/semget-no-space-left-on-device.html' title='semget: No space left on device'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-5878019769871676714</id><published>2007-02-13T00:49:00.000-08:00</published><updated>2007-02-13T00:30:45.491-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cPanel'/><category scheme='http://www.blogger.com/atom/ns#' term='easy fix'/><category scheme='http://www.blogger.com/atom/ns#' term='XWindows'/><title type='text'>cPanel and XWindows</title><content type='html'>XWindows dont work once cPanel is installed. Reasons are many why they disabled XWindows on the easy one script installation of cPanel, primary reason being security.&lt;br /&gt;&lt;br /&gt;However I needed Xwindows to be running on a cPanel installed machine. Here is what I did.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Edited /etc/rc.local and commented the line /scripts/securetmp&lt;/li&gt;&lt;li&gt;/etc/init.d/xfs start&lt;/li&gt;&lt;li&gt;chkconfig --add xfs&lt;/li&gt;&lt;li&gt;chkconfig --level 2345 xfs on&lt;/li&gt;&lt;/ol&gt;Rebooted the machine and when came up, mysql service didn't start. Easy guess was /tmp permissions. I checked the permissions and it was 755, changed to 2777 permissions&lt;br /&gt;     5. chmod 2777 /tmp&lt;br /&gt;     6. Login screen came in and I logged in :-)&lt;br /&gt;&lt;br /&gt;lol. That was easy isn't it ? May not be. Sometimes you need to edit the file /etc/X11/xorg.conf as well and search &amp; comment the lines "FontPath     "unix/:7100" . Rare cases. But that is a chance.&lt;br /&gt;&lt;br /&gt;If you are reading this blog and even after trying these you are not able to get the XWindows working after these work arounds, please comment. I also played around a few more settings before I could get it work. May be I can remember on seeing the error.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-5878019769871676714?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/5878019769871676714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=5878019769871676714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5878019769871676714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5878019769871676714'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/02/cpanel-and-xwindows.html' title='cPanel and XWindows'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-5037208673048299295</id><published>2007-02-12T23:50:00.000-08:00</published><updated>2007-02-13T00:58:57.950-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rpm build'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='2.6.19.2'/><category scheme='http://www.blogger.com/atom/ns#' term='upgradation'/><category scheme='http://www.blogger.com/atom/ns#' term='failure'/><title type='text'>Saga of Kernel upgradation - No dep file found</title><content type='html'>Oh yeah..It was a 1 hour journey to fix the issue. Lovely because I could fix it :-P Day seems bright as well, because I fixed the XWindows in a cPanel installed machine as well, that will explained in the next blog.&lt;br /&gt;&lt;br /&gt;Kernel upgradation was of 2.6.19.2 with grsec patch, after the grsec expand_stack vulnerability. Vulnerability was of high severity considering the purpose of grsec patch. So this time, I went for a rpm build. First build was successful, but I missed the elsa patch. Now ELSA , Enhance Linux System Accounting is included in the kernel itself. So built kernel rpm the second time and this time it was oops!!! :-D I love &lt;span style="font-weight: bold;"&gt;kernel panic oops&lt;/span&gt;. Fun begins here..&lt;br /&gt;&lt;br /&gt;I realized &lt;span style="font-weight: bold;"&gt;I went for Uvh instead of ivh&lt;/span&gt;. This is the second time I go for Uvh and having kernel panics. Uvh removed all grub entries and old kernels from /boot directory. Gone.&lt;br /&gt;&lt;br /&gt;Went to rescue mode, but when I tried to install the kernel it failed with post-scriptlet and pre-scriplet rpm script execution. So rpm installation on rescue mode failed (On a cPanel installed machine, I never was able to do it)&lt;br /&gt;&lt;br /&gt;So extracted the rpms using the command &lt;span style="font-weight: bold;"&gt;rpm2cpio kernel.rpm | cpio -idv&lt;/span&gt; . Result was two dirs, boot and lib in my `pwd` .&lt;br /&gt;&lt;br /&gt;Copied the files in boot and lib to appropriate directories. I now realize that &lt;span style="font-weight: bold;"&gt;initrd image is missing&lt;/span&gt;. Have to build it.&lt;br /&gt;&lt;br /&gt;Normal &lt;span style="font-weight: bold;"&gt;mkinitrd /boot/initird-2.6.17.img 2.6.17&lt;/span&gt; was erroring out &lt;span style="font-weight: bold;"&gt;No dep file found for kernel 2.6.17&lt;/span&gt; Fun again. Let's create the dep file now. &lt;span style="font-weight: bold;"&gt;depmod&lt;/span&gt; is the command which will help you here. Command (after a few trial and error) which actually worked was&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;depmod -ae -F /boot/System.map-2.6.17 /lib/modules/2.6.17&lt;/span&gt;&lt;br /&gt;and that worked.&lt;br /&gt;And finally ran the mkinitrd, which did it's job calm and quiet. Kernel booted up in the older kernel and I am happy :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-5037208673048299295?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/5037208673048299295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=5037208673048299295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5037208673048299295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5037208673048299295'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/02/saga-of-kernel-upgradation-no-dep-file.html' title='Saga of Kernel upgradation - No dep file found'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-3155741170427500872</id><published>2007-01-29T23:11:00.000-08:00</published><updated>2007-02-03T01:26:55.002-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='save $15'/><category scheme='http://www.blogger.com/atom/ns#' term='new coupons'/><category scheme='http://www.blogger.com/atom/ns#' term='godaddy'/><category scheme='http://www.blogger.com/atom/ns#' term='godaddy coupons'/><title type='text'>Godaddy coupon codes</title><content type='html'>I registered around 12 domains with godaddy a few days back. Total cost was around $80+ and when coupon code is entered, it saved me around $9. I wish I should have registered the domains only today :-P I received a email from Godaddy, saying that $15 discount for any order of $75 or more. I could have saved $6 more ..hehe..greedy me..&lt;br /&gt;&lt;br /&gt;Here I like to share some coupon codes of godaddy, which can save you some money. All coupon codes can save you $5 atleast, but on calculated entry of right coupon code, you can save anywhere between 5% to 15%. See below&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;gdm0138f&lt;/span&gt; - Save $15 discount for any order of $75 or more - Offer expires on Feb 15th, 2007 &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;gdm0125b&lt;/span&gt; - Get 10% off as well as get $5.99 .org domains with this coupon at GoDaddy. No maximum or minimum - Offer expires by 31st Jan 2007&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;gdm0118b&lt;/span&gt; - $6.95 on new .com ..expiry 31st Jan 2007&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;gdbb776&lt;/span&gt; - ALL .com domains at $6.95 not sure whether expired or not&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;LOL45&lt;/span&gt; SAVE 10% on any order of $50 or more! - Offer expires 02/28/07.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;goox025agc&lt;/span&gt; $6.95 domains.. Never expires ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-3155741170427500872?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/3155741170427500872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=3155741170427500872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3155741170427500872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3155741170427500872'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/01/godaddy-coupon-codes.html' title='Godaddy coupon codes'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-1373580581436199556</id><published>2007-01-11T20:09:00.000-08:00</published><updated>2007-01-11T22:20:59.461-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='named'/><category scheme='http://www.blogger.com/atom/ns#' term='nameserver issues'/><category scheme='http://www.blogger.com/atom/ns#' term='Bind'/><title type='text'>Nameserver issues - Bind 9</title><content type='html'>Many times when a website is not resolving, the first thing you must do is to check it in the dnsstuff.com or issue the command 'dig @ns1.domain.com domain.com'. If you are able to understand the response, it is easy to figure out where the problem lies..&lt;br /&gt;&lt;br /&gt;Q: How do I find the nameservers of a domain, again use dig. &lt;br /&gt;&lt;br /&gt;A : 'dig domain.com NS' will show a raw output of the output. &lt;br /&gt;&lt;br /&gt;Now there are different responses one will get for a dig query. Here, I am talking about Redhat based OSes. Other OSes may slightly vary in the config locations. Currently I am telling about the response which has the key word, Server Failure in it's response. Here are a few checks which may help you in figuring out the issue, yourself.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Check #1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It means, the nameserver on which you are querying for the domain don't hold the domain zone. Create an entry in /etc/named.conf and put the zone file somewhere in /var/named, and do a 'rndc reload'. And then do a 'dig @127.0.0.1 domain.com' . Check the answer section, does it respond something along the lines,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;;; ANSWER SECTION:&lt;br /&gt;domain.com 86400 IN     A       192.168.1.12&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then it is all good and locally it is working fine. If it didn't work, then read on..&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Check #2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Redhat based OSes the named config options are stored at /etc/sysconfig/named , by default. If all the lines there are commented with # or there is no line at all, we can proceed. Otherwise , check for this setting in particular,&lt;br /&gt;&lt;br /&gt;ROOTDIR="/var/named/run-root"&lt;br /&gt;&lt;br /&gt;Value of ROOTDIR can be anything, another most commonly found value is /var/named/chroot. Once set, that value means the root (it's new home) directory for the named user is /var/named/run-root and it can't see /bin or /usr or not even /tmp. Poor named..isn't it..Well that is called chrooted environment for better security. More about that later..&lt;br /&gt;&lt;br /&gt;Usually in such cases, /etc/named.conf will be a symbolic link to ROOTDIR_value/etc/named.conf (in this case it will be symlink to /var/named/run-root/etc/named.conf). And the domain.com zone file would need to be copied to /var/named/run-root/var or even in /var/named/run-root/var/named instead of /var/named and finally do a rndc reload&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Check #3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Okay all done. Still not working ? Did you check the log messages. By default the log messages appears in /var/log/messages, unless mentioned otherwise in the file parameter of the logging directive. Open two ssh sessions, reload rndc in one shell, and do a tail -f /var/log/messages on the other and watch for any warning or errors. Correct them accordingly. There are two tools which can help in the process.&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;named-checkconf &lt;/span&gt;and &lt;span style="font-style:italic;"&gt;named-checkzone&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;named-checkconf will parse /etc/named.conf and checks the file syntax. Nothing else. In case of servers where ROOTDIR is set use 'named-checkconf -t /var/named/run-root'. &lt;br /&gt;&lt;br /&gt;named-checkzone is what is most handy for me. Command to be issued is &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;named-checkzone domainname.com /var/named/run-root/var/named/domainname.com&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It will print out the errors, if there are any. Or else say loaded okay. See o/p below.&lt;br /&gt;&lt;br /&gt;Bad Zone&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[root@hackcity var]#named-checkzone domainname.com /var/named/run-root/var/named/domainname.com&lt;br /&gt;dns_master_load: domainname.com:24: domainname.com: CNAME and other data &lt;br /&gt;dns_master_load: domainname.com:26: domainname.com: CNAME and other data&lt;br /&gt;zone domainname.com/IN: loading master file domainname.com: CNAME and other data&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Good Zone&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[root@hackcity var]#named-checkzone domainname.com /var/named/run-root/var/named/domainname.com&lt;br /&gt;zone domainname.com/IN: loaded serial 1178542138&lt;br /&gt;OK&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Any idea on what was the error with the Bad Zone ?&lt;br /&gt;&lt;br /&gt;It was CNAME entries like, in the lines 24-26. Removed them and they were all fine. &lt;br /&gt;&lt;br /&gt;domainname.com.               IN CNAME        domainname.com&lt;br /&gt;domainname.com.               IN CNAME        domainname.com&lt;br /&gt;domainname.com.               IN CNAME        domainname.com&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Check #4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Last but very important, do you know which is the most important character in a DNS zone file ? It is the period "." :-) If you miss one, none of the above steps will help you. If you forget that the comments in DNS are not marked using # and instead ; , it will remind you. But if you forget the period -&gt; . &lt;- then you have to figure it out yourself. It is something every newbie admins miss.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-1373580581436199556?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/1373580581436199556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=1373580581436199556' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1373580581436199556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1373580581436199556'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/01/nameserver-issues-bind-9.html' title='Nameserver issues - Bind 9'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-7254438169012811940</id><published>2007-01-09T23:31:00.000-08:00</published><updated>2007-01-09T23:37:12.090-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='cPanel'/><title type='text'>DBI connect('mysql:localhost','root',...) failed: Access denied for user 'root'@'localhost' (using password: NO) at /usr/local/cpanel/Cpanel/Mysql.pm</title><content type='html'>Another cPanel issue. A customer was moved the servers, but he was not able to create any databases from cPanel in the new server, but works from phpmyadmin. So issue is isolated with cPanel, when checking the cPanel error logs at /usr/local/cpanel/logs/error_log , saw the follow error&lt;br /&gt;&lt;br /&gt;&lt;code&gt;DBI connect('mysql:localhost','root',...) failed: Access denied for user 'root'@'localhost' (using password: NO) at /usr/local/cpanel/Cpanel/Mysql.pm line 42 &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;which kept on repeating each time we take the cPanel page. I tried re-installing DBD::mysql, DBI..but it didn't work. Finally forced the DBI installation with the below command and it fixed :-)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/scripts/perlinstaller --force Bundle::DBI&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-7254438169012811940?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/7254438169012811940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=7254438169012811940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7254438169012811940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7254438169012811940'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2007/01/dbi-connectmysqllocalhostroot-failed.html' title='DBI connect(&apos;mysql:localhost&apos;,&apos;root&apos;,...) failed: Access denied for user &apos;root&apos;@&apos;localhost&apos; (using password: NO) at /usr/local/cpanel/Cpanel/Mysql.pm'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-1916075345344504859</id><published>2006-12-27T05:15:00.000-08:00</published><updated>2006-12-27T05:35:11.182-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Free web-based course'/><category scheme='http://www.blogger.com/atom/ns#' term='Sun Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenSolaris'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris 10'/><title type='text'>Free web based Solaris 10 course from SUN</title><content type='html'>In the BOSUG mailing list, Venky has mentioned about this free web-based Solaris 10 course from Sun Microsystems themselves:&lt;br /&gt;&lt;a href="http://www.sun.com/training/catalog/courses/WS-245.xml"&gt;http://www.sun.com/training/catalog/courses/WS-245.xml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You may need to register for free in the Sun Website for this. But it is more than worth it. Don't miss this golden chance to get an overview of Solaris 10 (and hence OpenSolaris). I didn't yet finish listening it (yeah it is voice enabled presentation made in Macromedia Breeze) but couldn't wait to post about the links. Below are the contents of the course.&lt;br /&gt;&lt;br /&gt;Module 1: DTrace&lt;br /&gt;Module 2: Extreme Network Performance&lt;br /&gt;Module 3: Solaris Containers&lt;br /&gt;Module 4: Solaris Containers for Linux Applications&lt;br /&gt;Module 5: Solaris ZFS&lt;br /&gt;Module 6: Solaris 10 Predictive Self Healing&lt;br /&gt;Module 7: Unparalleled Security&lt;br /&gt;&lt;br /&gt;Don't miss it guys and spread the news. I am already late, but better late than never :) Enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-1916075345344504859?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/1916075345344504859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=1916075345344504859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1916075345344504859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1916075345344504859'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/free-web-based-solaris-10-course-from.html' title='Free web based Solaris 10 course from SUN'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-4386142850691255455</id><published>2006-12-24T18:47:00.000-08:00</published><updated>2006-12-24T18:53:01.043-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='custom encoding'/><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><title type='text'>Creating PostgreSQL datase with custom encoding</title><content type='html'>To create a database with custom encoding, su as postgres user &lt;code&gt;su - postgres&lt;/code&gt; and login into PostgreSQL terminal.&lt;br /&gt;&lt;pre&gt;psql template1 postgres&lt;/pre&gt;&lt;br /&gt;and execute the following SQL command to create the db:&lt;br /&gt;&lt;pre&gt;create database username_dbname with owner=username encoding='ENCODING_NAME';&lt;/pre&gt;&lt;br /&gt;If you get the "CREATE DATABASE" message and no errors, all is ok and you can logout from the terminal by inputing '\q'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-4386142850691255455?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/4386142850691255455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=4386142850691255455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4386142850691255455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4386142850691255455'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/creating-postgresql-datase-with-custom.html' title='Creating PostgreSQL datase with custom encoding'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-1585749678796311425</id><published>2006-12-15T11:06:00.000-08:00</published><updated>2006-12-15T11:15:35.067-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Enters Domain biz'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><category scheme='http://www.blogger.com/atom/ns#' term='Hot news'/><title type='text'>Google enters into Domain Business!!!</title><content type='html'>Google is into acquisition spree. Where are they heading to ? No more research driver projects eh ? They are trying to make money now by all means possible, by their revolutionary search alogrithm , GFS and many other hot technologies and yes many pet projects of their team. Enough of technology, we are gonna buy Bill Gates soon. Way to go Google. Here is the hot news!!!&lt;br /&gt;&lt;br /&gt;Google said it has signed an agreement to resell Web site addresses held by domain name registrar services GoDaddy.com and eNom beginning Friday. Registration has been integrated in Google Apps for Your Domain.&lt;br /&gt;&lt;br /&gt;Registration fees are $10 annually. The service will support .com, .org, .net, .biz, and .info domains. The Mountain View, Calif., company said the service also includes the ability to create an administrative account to manage the site and a configuration tool to ensure the Google Apps is available on the new site.&lt;br /&gt;&lt;br /&gt;Google Apps for Your Domain includes Gmail, calendar, shared calendaring, Google Talk instant messaging, Google Page Creator, and the Start Page for creating a home page.&lt;br /&gt;&lt;br /&gt;The Web site of Bellevue, Wash.-based eNom says domain names to resellers sell for between $6.95 and $8.95 each annually. Mobile domain names, .Mobi, also are available from the site. Scottsdale, Ariz., GoDaddy, sells domains to resellers between $7 and $9 per name, plus an annual fee and additional charges for hosting and security certificates, according to its site.&lt;br /&gt;&lt;br /&gt;If it seems a little odd that Google would offer to resell domain names, that’s likely because its engineers are afforded the luxury to explore other types of applications.&lt;br /&gt;&lt;br /&gt;Similar to other innovative companies, Google allows intellectual freedom to its engineers of up to 20 percent of their working hours, estimates Guzman &amp;amp; Co. senior equity analyst Philip Remek. “Google probably has about 100 pet projects that will never generate revenue,” he said. “Then you have applications like Google Earth that on first glance looks like a toy, but when linked to local and mobile based search could become a powerful tool.”&lt;br /&gt;&lt;br /&gt;As the Internet evolves, some of Google’s pet projects could turn into revenue-generating applications, Mr. Remek said.&lt;br /&gt;&lt;br /&gt;Shares of Google rose $1.11 to $483.23 in mid-morning trading. (Not much as it raised when they took over GooTube :-))&lt;br /&gt;&lt;br /&gt;Original Article link &lt;a href="http://www.redherring.com/Article.aspx?a=20272"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-1585749678796311425?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/1585749678796311425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=1585749678796311425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1585749678796311425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1585749678796311425'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/google-enters-into-domain-business.html' title='Google enters into Domain Business!!!'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-5379048203968849608</id><published>2006-12-14T07:57:00.000-08:00</published><updated>2006-12-14T08:44:45.956-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='I hate MicroSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='support withdrawn'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Frontpage extensions'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='MicroSoft'/><title type='text'>I hate MicroSoft</title><content type='html'>Nothing new..But I hate MicroSoft. Normally I don't like writing flames, but I am not in a good mood now, after the day turned out to be worst after fighting with my ISP. So have to express my anger here to get my head cool. So here it goes,&lt;br /&gt;&lt;br /&gt;I knew that RTR Ready to Run Software, withdrew the support for MS FrontPage extensions. I never used FrontPage, but customers does and I must admit that it is hard to solve their issues without access to FP program. A customer was asking to install FP on his bare server. He was specific about the FP5 version. Ended up at RTR site to read the faq,&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#Where can I get the latest Unix/Linux FrontPage Server Extensions?&lt;br /&gt;The FPSE kits are no longer available for download.&lt;br /&gt; &lt;br /&gt;#I really need the Unix/Linux FPSE kit, can you please send me a copy?&lt;br /&gt;No, unfortunately, end-of-life really means end-of-life.&lt;br /&gt;&lt;br /&gt;#May I distribute the FPSE kit(s) that I have previously downloaded?&lt;br /&gt;No.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Searched for a few more, but all I could find is rpm based fp pack inside the plesk's rpm packages. They had everyone removed the file from every google cache. &lt;br /&gt;&lt;br /&gt;Though I admit that FP extensions was one of the packages with only security holes, I don't understand why Microsoft has to withdraw the support from Unix completely instead of announcing a EOL ? Looks like MicroSoft was frustrated with the popularity of Unix boxes over Windows. Or did they buy RTR ? I know lots of customers uses FP extensions on Linux, for it's ease of use and support for FP components. Plesk already withdraw the FP support in fresh installation of the panel on Linux. When is cPanel going to ? &lt;br /&gt;&lt;br /&gt;I always have a feeling that Anti Piracy cell of Microsoft is doing a great job in spreading Linux and other FOSS. Microsoft, please do more piracy raids, especially at small and medium business. Let me get more clients wanting to convert Windows boxes to Linux and convert their MS Office and Excel docs to sxw and sxi formats. &lt;br /&gt;&lt;br /&gt;Ask the IT Managers to pay you per computer connected to the Windows server, and they will consult with us and replace windows server to be replaced with Samba, released under GPL (v2 or v3 ?:-P). Praise the Anti Piracy department of M$ for spreading Linux and other FOSS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-5379048203968849608?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/5379048203968849608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=5379048203968849608' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5379048203968849608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5379048203968849608'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/i-hate-microsoft.html' title='I hate MicroSoft'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-1630919029567178392</id><published>2006-12-14T06:22:00.000-08:00</published><updated>2006-12-14T06:31:38.838-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux jokes'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux boot process'/><title type='text'>Inside the Linux boot process</title><content type='html'>Wow..Why did I miss this article :-( &lt;span style="font-weight:bold;"&gt;No one can explain the linux boot process better&lt;/span&gt;. Tim Jones did an excellent job with his article published at ibm.com developerworks, in explaining the linux boot processes. If you are a linux learner at a novice level, this is a must to read. Quoting some linux jokes here, before I give you the link to that article,&lt;br /&gt;&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;Windows: "Where do you want to go today?"&lt;br /&gt;Linux: "Where do you want to go tomorrow?"&lt;br /&gt;FreeBSD: "Are you guys coming, or what?"&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;Macs are for those who don't want to know why their computer works.&lt;br /&gt;Linux is for those who want to know why their computer works.&lt;br /&gt;DOS is for those who want to know why their computer doesn't work.&lt;br /&gt;Windows is for those who don't want to know why their computer doesn't work.&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The process of booting a Linux® system consists of a number of stages. But whether you're booting a standard x86 desktop or a deeply embedded PowerPC® target, much of the flow is surprisingly similar. This article explores the Linux boot process from the initial bootstrap to the start of the first user-space application. Along the way, you'll learn about various other boot-related topics such as the boot loaders, kernel decompression, the initial RAM disk, and other elements of Linux boot.&lt;br /&gt;&lt;br /&gt;Read more &lt;a href="http://www-128.ibm.com/developerworks/linux/library/l-linuxboot/?ca=dgr-lnxw07LinuxBoot"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-1630919029567178392?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/1630919029567178392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=1630919029567178392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1630919029567178392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1630919029567178392'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/inside-linux-boot-process.html' title='Inside the Linux boot process'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-5633890598267178066</id><published>2006-12-13T06:21:00.000-08:00</published><updated>2006-12-13T06:55:42.277-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='limit emails per hour'/><category scheme='http://www.blogger.com/atom/ns#' term='restoring lists'/><category scheme='http://www.blogger.com/atom/ns#' term='fixing DBM formats'/><category scheme='http://www.blogger.com/atom/ns#' term='DaDaMail'/><category scheme='http://www.blogger.com/atom/ns#' term='Dada mail'/><category scheme='http://www.blogger.com/atom/ns#' term='mailing list'/><title type='text'>Dada Mail Mailing lists v 2.9.2 - Restoring lists and fixing DBM errors</title><content type='html'>I always recommend Dada Mail lists for any customers having issues with mailman, Most serious hosting companies, limit the emails send out by the customers per hour. In that cases, if your mailing list has more than 1000 customers, and the limit per hour is set to 300 mails per hour, the extra 700 mails will be bounced.&lt;br /&gt;&lt;br /&gt;This is where DaDa Mails comes into picture. Off all the other excellent features, what I like is it's flexibility to configure number of emails to be sent at a certain interval (which can be in secs, mins and hours). Now a days, many other one way mailing list application have such feature, like phplist and so on. Does Mailman have that feature I may have missed ?&lt;br /&gt;&lt;br /&gt;Okay anyways the issue arised when a DaDa Mail installation suddenly started showing internal server errors. Checked the log file /usr/local/apache/logs/error_log to see the errors displayed as below,&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;No DBM package was successfully found or installed at /usr/lib/perl5/5.8.0/AnyDBM_File.pm line 15.&lt;br /&gt;Compilation failed in require at admin.cgi line 21.&lt;br /&gt;BEGIN failed--compilation aborted at admin.cgi line 21. &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;How did that happen ? A working installation suddenly reports that there is no DBM package. Only reason which I could not confirm though was that perl version was 5.8.0, which was not a desired version on a relatively new cPanel server. Now I had to install the DBM packages. AnyDBM_File.pm was reading @ISA = qw(NDBM_File DB_File GDBM_File SDBM_File ODBM_File), and none of the DBM packages was existing on the server.&lt;br /&gt;&lt;br /&gt;CPAN didn't had a version in it's tree for perl version 5.8.0, so download and executed the versions for V 5.8.0&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;wget -rnp http://search.cpan.org/src/JHI/perl-5.8.0/ext/GDBM_File/&lt;br /&gt;wget -rnp http://search.cpan.org/src/JHI/perl-5.8.0/ext/NDBM_File/&lt;br /&gt;wget -rnp http://search.cpan.org/src/JHI/perl-5.8.0/ext/SDBM_File/&lt;br /&gt;wget -rnp http://search.cpan.org/src/JHI/perl-5.8.0/ext/ODBM_File/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Did a make and make install on all of them and internal server error is now gone to be replaced with another error, while trying to login in administration panel of DaDa Mail using the pass which is present in plain text in DADA/Config.pm. Error was as below&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[Wed Dec 13 06:09:57 2006] mail.cgi: Dada Mail 2.9.2 warning! List settings db empty!  List setting DB Possibly corrupted! at /DADA/MailingList/Settings/Db.pm line 115.&lt;br /&gt;[Wed Dec 13 06:09:57 2006] mail.cgi: Dada Mail 2.9.2 warning! no listshortname saved in list settings db! List settings DB Possibly corrupted! at /DADA/MailingList/Settings/Db.pm line 118.&lt;br /&gt;[Wed Dec 13 06:09:57 2006] mail.cgi: listshortname in db, 'announcements' does not match saved list shortname: '' at /DADA/MailingList/Settings/Db.pm line 121.&lt;br /&gt;BAD List name "" No such file or directory at /DADA/Template/HTML.pm line 145&lt;br /&gt;[Wed Dec 13 06:09:57 2006] [error] [client 192.168.1.1] Premature end of script headers: /home/example/public_html/cgi-bin/dada/mail.cgi&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Only option left to me was to restore the list. Accessed the restoring list URL for the DaDa mail at http://example.com/cgi-bin/dada/mail.cgi?f=restore_lists (Replace example.com with your_domain.com). Asked for the admin password and on correct entry , welcomed by Restore screen.. Restore done and all is well :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-5633890598267178066?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/5633890598267178066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=5633890598267178066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5633890598267178066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/5633890598267178066'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/dada-mail-mailing-lists-v-292-restoring.html' title='Dada Mail Mailing lists v 2.9.2 - Restoring lists and fixing DBM errors'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-3763896229345164784</id><published>2006-12-12T04:44:00.000-08:00</published><updated>2006-12-12T07:25:42.796-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mod_limitipconn'/><category scheme='http://www.blogger.com/atom/ns#' term='Limit bandwidth'/><category scheme='http://www.blogger.com/atom/ns#' term='limit simultaneous connections'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Limiting apache connections per IP'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>Limiting apache connections per IP</title><content type='html'>There are many cases, where on a shared hosting environment, one of the sites may be getting slashdotted or dugg for various reasons. That is where mod_limitipconn comes to help. There are many such modules available. This situation arised on apache 1.3 server for me, and so the patch is meant for 1.3 server only.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Installation&lt;br /&gt;~~~~~~~~~~~~~~~~~&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;wget http://dominia.org/djao/limit/mod_limitipconn-0.04.tar.gz&lt;br /&gt;wget ftp://ftp.opennet.ru/pub/web/modules/limits/mod_limitipconn-0.04-vhost.patch&lt;br /&gt;tar xvzf mod_limitipconn-0.04.tar.gz&lt;br /&gt;cd mod_limitipconn-0.04/&lt;br /&gt;patch -p1 &lt; ../mod_limitipconn-0.04-vhost.patch &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This was a cPanel server and apache root was at /usr/local/apache. So used the following commands&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/usr/local/apache/bin/apxs -c mod_limitipconn.c&lt;br /&gt;/usr/local/apache/bin/apxs -i -a -n limitipconn mod_limitipconn.so&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The above two commands, should have made a backup copy of your existing httpd.conf and added two  new lines,&lt;br /&gt;&lt;code&gt;&lt;br /&gt;LoadModule limitipconn_module libexec/mod_limitipconn.so&lt;br /&gt;AddModule mod_limitipconn.c&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The apxs command need not be issued, you can simple edit the Makefile and change the first line which says,&lt;br /&gt;&lt;br /&gt;APXS = apxs&lt;br /&gt;to &lt;code&gt;&lt;br /&gt;APXS = /usr/local/apache/bin/apxs&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and then run the normal make and make install thing.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Configuration&lt;br /&gt;~~~~~~~~~~~~~&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For the Vhost you have to limit, say, you want to limit access to http://www.example.com/gallery/ (which may be having lots of controversial pics) use this inside it's virtual host section, like&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Location /gallery&amp;gt;&lt;br /&gt;        MaxConnPerUid 25&lt;br /&gt;        MaxConnPerIP 2&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What it essentially means 25 connections to gallery and each can access or view two images at a time. There are more directives for limitconnip module which you can find from the code. After the addition the Vhost section may look like below,&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Virtualhost 192.168.1.102&amp;gt;&lt;br /&gt;ServerAlias example.com&lt;br /&gt;ServerAdmin webmaster@example.com&lt;br /&gt;DocumentRoot /home/example/public_html&lt;br /&gt;BytesLog domlogs/example.com-bytes_log&lt;br /&gt;ServerName www.example.com&lt;br /&gt;&lt;br /&gt;&amp;lt;IfModule mod_limitipconn.c&amp;gt;&lt;br /&gt;        &amp;lt;Location /gallery&amp;gt;&lt;br /&gt;        MaxConnPerUid 25&lt;br /&gt;        MaxConnPerIP 2&lt;br /&gt;        &amp;lt;/Location&amp;gt;&lt;br /&gt;&amp;lt;/IfModule&amp;gt;&lt;br /&gt;&lt;br /&gt;User example&lt;br /&gt;Group example&lt;br /&gt;CustomLog /usr/local/apache/domlogs/example.com combined&lt;br /&gt;ScriptAlias /cgi-bin/ /home/example/public_html/cgi-bin/&lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Other options to check are &lt;a href="http://www.ivn.cl/apache/files/source/mod_vhost_limit-0.1.tgz"&gt;mod_vhost_limit&lt;/a&gt; , &lt;a href="http://beta.blogger.com/www.snert.com/Software/mod_throttle/"&gt;mod_throttle&lt;/a&gt; , mod_bandwidth, mod_curb and mod_cband. There may be few more such bandwidth throttling modules available. If you find better ones, do suggest. I will be interested in learning them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-3763896229345164784?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/3763896229345164784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=3763896229345164784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3763896229345164784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3763896229345164784'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/limiting-apache-connections-per-ip.html' title='Limiting apache connections per IP'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-6049635289439909713</id><published>2006-12-12T03:00:00.000-08:00</published><updated>2006-12-12T03:04:41.217-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sorting IPs'/><category scheme='http://www.blogger.com/atom/ns#' term='bash scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Shell scripting'/><title type='text'>Sorting IPs in bash scripting</title><content type='html'>Oh yeah..This is something I had my head banging for a few minutes, till I figured out the -t option of sort. Okay..I had a list of IPs around 20000 today, for which I had to sort to find any patterns so that I can block the subnet in the firewall itself. I ended up with &lt;br /&gt;&lt;br /&gt;&lt;code&gt;sort -u -n -t. -k 1,1 -k 2,2 -k 3,3 -k 4,4 /etc/eximblacks&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;-k and -t were the key options you need to look in the menu. There are more than one way to do it :-). &lt;br /&gt;&lt;br /&gt;That helped me. Hope it may help you at some point of time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-6049635289439909713?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/6049635289439909713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=6049635289439909713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/6049635289439909713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/6049635289439909713'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/sorting-ips-in-bash-scripting.html' title='Sorting IPs in bash scripting'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-301562868674621724</id><published>2006-12-09T19:38:00.000-08:00</published><updated>2006-12-09T21:19:31.651-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cool rpm commands'/><category scheme='http://www.blogger.com/atom/ns#' term='RPM hacks'/><category scheme='http://www.blogger.com/atom/ns#' term='Restoring original attributes'/><category scheme='http://www.blogger.com/atom/ns#' term='Rebuilding RPM DB'/><category scheme='http://www.blogger.com/atom/ns#' term='RPM'/><category scheme='http://www.blogger.com/atom/ns#' term='ownership and permissions'/><category scheme='http://www.blogger.com/atom/ns#' term='installed binary'/><category scheme='http://www.blogger.com/atom/ns#' term='of a file'/><category scheme='http://www.blogger.com/atom/ns#' term='integrity'/><title type='text'>Few RPM Management Hacks</title><content type='html'>I always have to look at the man page or search for the cpio options (I usually dont use cpio formats) whenever I wanted the files of a rpm to be extracted without installing it. I thought of putting together a few commands which may help some of you,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Extracting files from an RPM archive&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;rpm2cpio RPM_file | cpio -idmv &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The above command will create the rpm directory structure inside the present working directory (pwd) and the entire rpm will be extracted inside the subdirectory. &lt;br /&gt;&lt;br /&gt;If you just want to extract the binaries in the folder which rpm may install in /bin/ , /sbin/ , /usr/local/bin/ , /usr/local/sbin then append a few more options / words to the command like below,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;rpm2cpio RPM_file | cpio -idmv '*/bin/*' '*/sbin/*' &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Rebuilding RPM database&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Often I have experienced situations where a yum upgrade on RPM based OSes, break the rpm database. Sometimes a reboot usually fixes it, but in case if you want to fix it rightaway without rebooting it, try rebuilding the RPM db by following the below steps,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cd /var/lib&lt;br /&gt;tar cvzf rpmdb.tar.gz ./rpm&lt;br /&gt;rm -f /var/lib/rpm/__db.00?&lt;br /&gt;rpm --rebuilddb &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There are many complex situations where rpm --rebuilddb can't help, where you have to use other tools to rebuild DB, the harder way involving, /usr/lib/rpm/rpmdb_dump and /usr/lib/rpm/rpmdb_verify. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Verifying the RPM integrity&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you suspect your machine is hacked and your sshd or netstat or ps or fuser is been replaced by the hacker by their own versions, you can use rpm -V RPM_name to check the integrity of the files installed by the RPM. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;rpm -Vf /bin/netstat&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The above command will verify the integrity of all the files installed by the RPM package which installed the netstat also. If all are fine, you wont get any output, otherwise similar to below can appear.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#rpm -Vf /usr/sbin/sshd&lt;br /&gt;S.5....T  c /etc/ssh/sshd_config&lt;br /&gt;S.5....T    /usr/sbin/sshd&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Notations are below (if 5 is there in the flag, it means md5 differs. More details, man rpm) &lt;br /&gt;&lt;br /&gt;5 — MD5 checksum&lt;br /&gt;S — file size&lt;br /&gt;L — symbolic link&lt;br /&gt;T — file modification time&lt;br /&gt;D — device&lt;br /&gt;U — user&lt;br /&gt;G — group&lt;br /&gt;M — mode (includes permissions and file type)&lt;br /&gt;? — unreadable file&lt;br /&gt;&lt;br /&gt;Remember this is a very basic test and can help you get the kiddies who is on the learning track, but not the professional hackers, who know their job. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Restoring original attributes of an rpm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Often users messes up the permissions of important files and folders, here for a test I messed up the ownership and permissions of files. Go through it for the steps on restoring the file attributes.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@hackcity ~]# rpm -qf /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;openssh-server-3.9p1-8.RHEL4.12&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@hackcity ~]# ls -l /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;-rw-------  1 root root 3027 Aug 14 05:07 /etc/ssh/sshd_config&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@hackcity ~]# chmod 777 /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@hackcity ~]# chown hacktech.hacktech /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@hackcity ~]# ls -l /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;-rwxrwxrwx  1 hacktech hacktech 3027 Aug 14 05:07 /etc/ssh/sshd_config&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@hackcity ~]# rpm --setperms openssh-server-3.9p1-8.RHEL4.12&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@hackcity ~]# ls -l /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;-rw-------  1 hacktech hacktech 3027 Aug 14 05:07 /etc/ssh/sshd_config&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@hackcity ~]# rpm --setugids openssh-server-3.9p1-8.RHEL4.12&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;[root@hackcity ~]# ls -l /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;-rw-------  1 root root 3027 Aug 14 05:07 /etc/ssh/sshd_config&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Pretty useful RPM options&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I will use sshd packages for listing those options,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-weight:bold;"&gt;#rpm -q --whatrequires openssh&lt;/span&gt;&lt;br /&gt;openssh-clients-3.9p1-8.RHEL4.12&lt;br /&gt;openssh-askpass-gnome-3.9p1-8.RHEL4.12&lt;br /&gt;openssh-askpass-3.9p1-8.RHEL4.12&lt;br /&gt;openssh-server-3.9p1-8.RHEL4.12&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-weight:bold;"&gt;rpm -qf --stats /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;openssh-server-3.9p1-8.RHEL4.12&lt;pre&gt;&lt;br /&gt;   total:             1      0.000000 MB      0.135489 secs&lt;br /&gt;   digest:            2      0.029817 MB      0.006168 secs&lt;br /&gt;   signature:         1      0.000000 MB      0.092698 secs&lt;br /&gt;   dbget:             6      0.094604 MB      0.005985 secs&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Well that's it. If you like RPM read more at http://www.rpm.org/max-rpm/ . BTW &lt;a href="http://kitenet.net/programs/alien/"&gt;Alien&lt;/a&gt; is a good program to convert between the rpm, dpkg, stampede slp, and slackware tgz file formats&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-301562868674621724?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/301562868674621724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=301562868674621724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/301562868674621724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/301562868674621724'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/few-rpm-management-hacks.html' title='Few RPM Management Hacks'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-4651434166125938924</id><published>2006-12-06T02:29:00.000-08:00</published><updated>2006-12-06T03:57:09.598-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Youtube video'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='TV coverage'/><category scheme='http://www.blogger.com/atom/ns#' term='Boot from USB'/><category scheme='http://www.blogger.com/atom/ns#' term='Belenix'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto links'/><title type='text'>Booting from your USB/Pen/Thumb Drive</title><content type='html'>I just read a post from Joe (I guess he is a manager at SUN - if so, a good one to support the developers :-)) mentioning about the visual media coverage of Anil Gulecha's and Moinak Ghosh's achievement of booting live Solaris from USB. Watch the video below &lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/F5WGWJs5LXU"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/F5WGWJs5LXU" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;In this light, I thought of mentioning a few USB bootable live CDs in linux and mention a few links also, mainly for my own future reference. Linux is the only OS, I know atleast a bit of, even I am playing with OpenSolaris, not yet as an admin. Is there a hosting based GUI control panel available for OpenSolaris ? I could find only &lt;a href="http://www.zomos.com"&gt;Zomos&lt;/a&gt; (though the site says only v9 is supported, but both arch SPARC and x86). If there is a good and "non-technical user" friendly one, I bet OpenSolaris is gonna compete with Linux in hosting industry in next few years. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.pendrivelinux.com/"&gt;PenDriveLinux&lt;/a&gt; This is one good discussion site and the Live Linux I would recommend is &lt;a href="http://www.slax.org/"&gt;Slax&lt;/a&gt; So here goes a few URLs,&lt;br /&gt;&lt;br /&gt;&lt;a href="http://rz-obrian.rz.uni-karlsruhe.de/knoppix-usb/"&gt;Boot Knoppix from USB&lt;/a&gt;&lt;br /&gt;Knoppix Remastering toolkit FAQ can be read &lt;a href="http://www.knoppix.net/wiki/Knoppix_Remastering_Howto"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.debian.org/BootUsb"&gt;BootUSB from debian Wiki&lt;/a&gt;&lt;br /&gt;Googling for a HOWTO boot from USB can fetch you &lt;a href="http://www.simonf.com/usb/"&gt;this link &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-4651434166125938924?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/4651434166125938924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=4651434166125938924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4651434166125938924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4651434166125938924'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/booting-from-your-usbpenthumb-drive.html' title='Booting from your USB/Pen/Thumb Drive'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-1432748953258517715</id><published>2006-12-05T21:33:00.000-08:00</published><updated>2006-12-05T21:57:47.151-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mail Quotas Mismatch'/><category scheme='http://www.blogger.com/atom/ns#' term='cPanel'/><category scheme='http://www.blogger.com/atom/ns#' term='mbox to maildir conversion'/><title type='text'>cPanel mail quota mismatch</title><content type='html'>cPanel decided that they want to use maildir format for it's mailboxes and started converting all mboxes to maildir. There are 100's of issues (I love these issues and work arounds :))  involved with the conversion, like failing to convert some large mboxes of more than 1GB+, quotas mismatch and so on and on.. But I must agree, that they did a pretty good job with the /scripts/convert2maildir script which uses /usr/local/cpanel/3rdparty/mb2md/mb2md . Actual project page is at http://batleth.sapienti-sat.org/projects/mb2md/.&lt;br /&gt;&lt;br /&gt;When customers use the Show Disk Space used cPanel actually reads the quota from a filename inside the mail directory usually located at /home/username/mail/domainname.com/emailaccount/maildirsize and prints out in a -h format (human readable format). After the conversion, around 50% of the accounts will show the wrong quota usage. The following command fixes the issue for you and let cPanel recalculate the disk usage.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;find /home -name "maildirsize" -exec rm -f {} \;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For those of who like xargs use,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;find /home -name "maildirsize" | xargs rm -f&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;or even&lt;br /&gt;&lt;br /&gt;&lt;code&gt;find /home -name "maildirsize" -delete&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Replace /home with /home/username/mail for dealing with one particular cPanel account.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-1432748953258517715?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/1432748953258517715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=1432748953258517715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1432748953258517715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/1432748953258517715'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/12/cpanel-mail-quota-mismatch.html' title='cPanel mail quota mismatch'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-2324807391038773323</id><published>2006-11-27T03:53:00.000-08:00</published><updated>2006-12-13T08:27:33.000-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ZFS'/><category scheme='http://www.blogger.com/atom/ns#' term='Technical Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenSolaris'/><category scheme='http://www.blogger.com/atom/ns#' term='Test your knowledge on OpenSolaris'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenSolaris Quiz'/><title type='text'>The OpenSolaris Quiz - FOSS.IN/2006</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;These are OpenSolaris Quiz questions presented in &lt;a href='http://foss.in/2006/'&gt;FOSS.IN/2006&lt;/a&gt; These answers are mine and disclaimers apply here. I am putting it here, since I found the questions good enough to make me interested toward OpenSolaris&lt;br&gt;&lt;/br&gt; Edit: Please consider the questions only and not the answers. Attended the BOSUG, and Ananth helped in confirming a few answers. Some went over my head though&lt;a href='http://photos1.blogger.com/x/blogger2/1777/4240/1600/51698/opensolaris_logo_200x35.png' onblur='try {parent.deselectBloggerImageGracefully();} catch(e) {}'&gt;&lt;img border='0' alt='' src='http://photos1.blogger.com/x/blogger2/1777/4240/320/976360/opensolaris_logo_200x35.png' style='margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;'&gt;&lt;/img&gt;&lt;/a&gt;&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;div&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold; font-size: 130%;'&gt;&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;The OpenSolaris Quiz - FOSS.IN/2006&lt;/span&gt;&lt;br&gt;&lt;/br&gt;&lt;/div&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;1.&lt;/span&gt; Which Computer Scientist who co-founder the Apache HTTP server servers as a board member of the OpenSolaris CAB.&lt;br&gt;&lt;/br&gt;Roy Thomas Fielding&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;2. &lt;/span&gt;On a Quad core, dual processor machine, how many times can the DTrace probe 'profile:::tick-17hz' fire in a span of 3 seconds&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;17&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;3. &lt;/span&gt;What does this Dtrace one-liner do ?&lt;br&gt;&lt;/br&gt;proc:::signal-send { printf("%s - %s". args[2], args[1] - }&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;Trace all the signals sent to all the processes running on the system.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;4.&lt;/span&gt; 256 Quadrillion Zetabytes is a significant number as regard ZFS. This is the amount of data required to fillup a ZFS filesystem. How many digits are there in that number ? (when expressed as bytes)&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;39&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;5.&lt;/span&gt; Expand COW in the context of ZFS.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;Copy on Write.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;6.&lt;/span&gt; FreeBSD = Ktrace, Linux = strace , Solaris = ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;truss (dtrace is way too advanced :-))&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;7. &lt;/span&gt;Which binary / libc function enables seamless execution of 64 and 32 bit binaries on a 64 bit OpenSolaris machine ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;isaexec.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;8.&lt;/span&gt; How do you encrypt a file with AES algorithm using the OpenSolarius Cryptographic Frameword ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;encrypt -a aes -i file.txt&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;9. &lt;/span&gt;Which is the distro wholly created by the Bangalore OpenSolaris community ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;Belenix&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;10.&lt;/span&gt; How many privileges does OpenSolaris have by default ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;48&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;11.&lt;/span&gt; Which OpenSolaris project is underway to introduce virtualization in networking ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;CrossBow.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;12. &lt;/span&gt;What is the latest Source Code Management System used to OpenSolaris development ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;Merucrial / Hg&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;13. &lt;/span&gt;Write down a minimal fool proof "C" function which takes a (void *) pointer as the argument and returns :&lt;br&gt;&lt;/br&gt;0 - if it is an invalid userland pointer&lt;br&gt;&lt;/br&gt;1 - If the pointer points to a valid userland address backed up by a page. No core dumps, No signal handling. (Elegant Solutions = ++ points)&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;shh...shh...Answer is something I may be able to figure out after studying C :-D&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;14.&lt;/span&gt; Write a DTrace script to print the absolute path of ALL files being opened by processes running in a system.&lt;br&gt;&lt;/br&gt;Note : Your script should not throw any kind of errors when being executed.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;15.&lt;/span&gt; Draw an approximate diagram that explains the code-flow when a system callis called from a kernel thread&lt;br&gt;&lt;/br&gt;Syscall ==&gt; Kernel panic :-) &lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;16.&lt;/span&gt; Give three expansions for the acronym BFU which would be valid in the OpenSolaris World.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;a) Blinding Fast Upgrade&lt;br&gt;&lt;/br&gt;b) Big Fucking Make&lt;br&gt;&lt;/br&gt;c) Bonwick-Faulkner Upgrade&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;17.&lt;/span&gt; Assuming you could completely populate a zpool to its theoretical limit&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;Qa)&lt;/span&gt; Find the approximate energy required to do the same (in Electron Volt)&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;7.488 x 10&lt;sup&gt;46&lt;/sup&gt;&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-style: italic; font-weight: bold;'&gt;Qb)&lt;/span&gt; Find the Mass Equivalnet for the energy&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;136 billion kg&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;18.&lt;/span&gt; You want to find out how many minor faults occur from the time your kernel loads till the time you get your login prompt during boot. How would you go about doing it ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;dnk again. It must be a dtrace script. I will try to write one once I install OpenSolaris.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;19.&lt;/span&gt; SMF automatically manages dependencies betweekn services.&lt;br&gt;&lt;/br&gt;a. What is the ideal data structure to store the dependency information ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;Sorted Tree / Graph&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;b. What is the best algorithm to find the order in which the serices should be started ?&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;Topology Sort &lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;span style='font-weight: bold;'&gt;20. &lt;/span&gt;Using any or all of the new and old technologies in OpenSolaris, write about a really wild or cool project that you would like to implement.&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;I hardly know of any technology of OpenSolaris in detail :-(. I am looking for clustering and building a NAS using ZFS. I got some idea, but will try to do a bit after going home only.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-2324807391038773323?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/2324807391038773323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=2324807391038773323' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/2324807391038773323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/2324807391038773323'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/11/these-are-opensolaris-quiz-questions.html' title='The OpenSolaris Quiz - FOSS.IN/2006'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-7090156994249252338</id><published>2006-11-27T02:05:00.000-08:00</published><updated>2006-11-27T05:11:29.099-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FOSS.in 2006'/><category scheme='http://www.blogger.com/atom/ns#' term='FOSS.in'/><category scheme='http://www.blogger.com/atom/ns#' term='FOSS.in 06'/><category scheme='http://www.blogger.com/atom/ns#' term='BOSUG'/><category scheme='http://www.blogger.com/atom/ns#' term='Belenix'/><category scheme='http://www.blogger.com/atom/ns#' term='FOSS'/><title type='text'>I missed FOSS.in for the last years</title><content type='html'>Yes that's true. Being a delegate there for last 2 days of the India's premium FOSS event conducted from Nov 24 - Nov 26th, I am now realizing what I missed in the last few years. Chances of meeting FOSS's who's who. Oh wait!!..for anyone who dont know what is FOSS it stands for "Free and Open Source Software". We had talks by Rasmus Lerdorf, founder of php (till v2), Tim Pritlove (all in all of Chaos Computer  Club), Luke Kanies (man behind the PuPPeT) and Harald Welte (gpl-violations.org and the diamond sponsor of FOSS.in). On the eve of 25th, there was also a interesting panel discussion by the India's who's who of FOSS where, Karunakar (The linux localite), Kishore Bhargava (The Technological Evangelist), Atul Chitnis (one and only toolz), Frederick Noronha (Foss media guy), Arun Sharma (The FreeBSD India) , Sirtaj Singh Kang (wah taj!!, the KDE India Inc.) and K.Dakshinamurthy. And the great job of moderation was done by Sudhakar Thaths Chandra (Thaths). Talk on past and future 10 years of linux in India was so interesting and in the question session, (which was stopped by IISc guys) the pioneers of FOSS movement in India gave tit for tat replies for all of us, who speaks a lot, and works a bit in spreading FOSS.&lt;br /&gt;&lt;br /&gt;The most lively hall was of a MNC who are pioneers in technology, but lacks the marketing. The enthusiasm I could see in each and every person in SUN's hall in spreading the knowledge and the work. The real FOSS activists :-). I missed their BoF's :-(. I believe the entire BOSUG team was there. Most of them know what they are doing. Sanjeeva, Shivakumar, Sheshadri all were of great help in explaining the concepts. I was more interested in hearing about details on ZFS. And yeah I registered to BOSUG list. Anil Gulecha, who is a third year computer science student at JSS Academy, Bangalore and the person who put a live bootable Belenix into a thumbdrive, delivered excellent talk on booting Belenix (Ingeniously Indian!!) from USB and explaining the bootup calls like livecd, liveUSB and why they prefer USB to CD and so on. Unfortunately, I couldn't bootup the liveCD they provided. Need to spend some time on it, or have to get the laptop to next BOSUG Meet. BTW AFAIK Belenix is the first OpenSolaris distribution to be able to run from a USB drive and it supports profiling too :-) They say it gets you the desktop in 60-90 sec which is awesome.&lt;br /&gt;&lt;br /&gt;I am a guy who have been using Linux for some time, about 6 years, and if I remember right, I first installed linux RH 7.1 after 6 months when I first touched a computer. Believe it didnt fascinate me much. I installed Linux on a 2Gb partition of 20Gb disk and the 64MB RAM, and linux GUI (XF86 ??) was damn slow and I couldn't do anything there which resulted in formatting the disk space. It was only after a few months later, I learned about multiple virtual terminals at Ctrl + Alt + F1 --&gt; F7 and from that point, I switched to Linux. I loved the b/w screen and could get HCF modem work there in linux, fixed a few issues of other's HD's where HD was not at all detected in windows and at one point or the other, I completely switched to linux unknowingly.&lt;br /&gt;&lt;br /&gt;I believe it's the time I play with OpenSolaris and explore the latest technologies. I will surely attend the next BOSUG. I will go back to Cochin and talk with Bejoy Sir more on that. He and Prajeev Sir are my inspirations. They are the known best in Solaris, both SCNA :-) I need to read a lot about dtrace and ZFS. I will explain about them, as I understand in this blog at a latter point. Long live FOSS.IN.&lt;br /&gt;&lt;br /&gt;NB: Next blog is the questions of OpenSolaris Quiz conducted at FOSS.in 2006 and my answers to it, as I think.&lt;br /&gt;&lt;br /&gt;Meanwhile visit foss.in and view the snaps at,&lt;br /&gt;&lt;br /&gt;http://www.flickr.com/photos/tags/foss.in&lt;br /&gt;http://www.flickr.com/photos/tags/fossin&lt;br /&gt;http://www.flickr.com/photos/tags/fossin2006&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-7090156994249252338?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/7090156994249252338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=7090156994249252338' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7090156994249252338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7090156994249252338'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/11/i-missed-fossin-for-last-years.html' title='I missed FOSS.in for the last years'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-7721701085451024790</id><published>2006-11-24T09:58:00.000-08:00</published><updated>2006-11-24T10:02:16.138-08:00</updated><title type='text'>Symlinks in Unix OSes</title><content type='html'>Around a year back, this was actually tip or quite a new information to me. I was really shocked to know that I didn’t know the fact. :-( Well the information is the symbolic link (the soft links) have the same size as the number of characters in it’s target&lt;br /&gt;&lt;br /&gt;Creating the soft link,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-size:130%;"&gt;ln -s /hdb9/SuSe9.3/SUSE-9.3-Prof-i386-CD1.iso Suse1.iso&lt;br /&gt;&lt;br /&gt;ls -l Suse1.iso&lt;br /&gt;lrwxrwxrwx 1 guest guest 40 May 1 01:21 Suse1.iso -&gt; /hdb9/SuSe9.3/SUSE-9.3-Prof-i386-CD1.iso&lt;br /&gt;&lt;br /&gt;wc - &lt;/span&gt;&lt;/code&gt;(to take input from stdin)&lt;br /&gt;&lt;code&gt;&lt;span style="font-size:130%;"&gt;/hdb9/SuSe9.3/SUSE-9.3-Prof-i386-CD1.iso&lt;/span&gt; &lt;/code&gt;(Ctrl + D here to get the results)&lt;br /&gt;&lt;code&gt; &lt;span style="font-size:130%;"&gt;0 1 40 -&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Signing off..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-7721701085451024790?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/7721701085451024790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=7721701085451024790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7721701085451024790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/7721701085451024790'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/11/symlinks-in-unix-oses.html' title='Symlinks in Unix OSes'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-3925607960097202410</id><published>2006-11-24T04:12:00.000-08:00</published><updated>2006-11-28T23:18:55.247-08:00</updated><title type='text'>Upgrading kernel in CentOS</title><content type='html'>A piece of cake for sysadmins. A old tutorial, I wrote, but pasting now, in case it helps someone in  any way.&lt;br /&gt;&lt;br /&gt;Make sure that you have enough space for your kernel in /boot before you install the new kernel. At least 15 MB!!&lt;br /&gt;&lt;br /&gt;Why should I update the kernel ?&lt;br /&gt;================================&lt;br /&gt;&lt;br /&gt;Three reasons mainly,&lt;br /&gt;&lt;br /&gt;1) For better driver support&lt;br /&gt;2) For better performance, stability and reliability.&lt;br /&gt;3) For security reasons.&lt;br /&gt;&lt;br /&gt;The default kernels coming with OS version less than CentOS 4.3 and CentOS 3.7 are exploitable. For the details of CentOS 4 bugs, refer (CentOS  = Free RHEL)&lt;br /&gt;&lt;br /&gt;https://rhn.redhat.com/errata/RHSA-2006-0617.html&lt;br /&gt;http://www.securityfocus.com/bid/18992/info&lt;br /&gt;http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-3745&lt;br /&gt;&lt;br /&gt;How do I know my current kernel version installed&lt;br /&gt;=================================================&lt;br /&gt;&lt;br /&gt;1) Login to server as user root and issue the command `uname -r`&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;2) `rpm -q kernel` command issued as root, will return all the types and versions of kernels installed on your server.&lt;br /&gt;&lt;br /&gt;Which is my boot loader - LILO or GRUB ?&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;How do I know whether my bootloader is grub or lilo ?&lt;br /&gt;&lt;br /&gt;Unless you specifically changed the bootloader, it is GRUB by default on most of newer RPM based OS, like CentOS 3.x , CentOS 4.x, RHEL. Though this question was unnecessary since then, for those who have played with installing both lilo and grub on your servers may have some doubt on the present bootloader.&lt;br /&gt;&lt;br /&gt;Assuming you installed the bootloader to the MBR and your harddisk is /dev/hda,&lt;br /&gt;you could run (as root):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;dd if=/dev/hda bs=512 count=1 2&gt;&amp;1 | grep GRUB&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;if = Input File (Everything in a UNIX system is a file!!! even harddisk :-), ofcourse with a few exceptions)&lt;br /&gt;bs =  bytes&lt;br /&gt;count = 1st block&lt;br /&gt;&lt;br /&gt;If this returns:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;          Binary file (standard input) matches&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then you're using GRUB.  (Basically you're just searching the MBR to see if the word 'GRUB' shows up inside.)  If it doesn't say anything, then you're not using GRUB and instead LILO. You may need to confirm that by 'grep LILO' instead.&lt;br /&gt;&lt;br /&gt;You can identify the device name from fdisk -l command. Device name will be /dev/hd[a-h] for IDE disks, /dev/sd[a-p] for SCSI disks. My desktop, shows the fdisk -l output as below, which means my device name would be /dev/hdc and for knowing the bootloader, I would actually issue the command listed below.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Disk /dev/hdc: 60.0 GB, 60011642880 bytes&lt;br /&gt;255 heads, 63 sectors/track, 7296 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;/span&gt;&lt;/code&gt; ...o/p continued&lt;br /&gt;&lt;br /&gt;     dd if=/dev/hdc bs=512 count=1 2&gt;&amp;amp;1 | grep GRUB&lt;br /&gt;&lt;br /&gt;Where do I get the latest RedHat kernels ?&lt;br /&gt;===========================================&lt;br /&gt;&lt;br /&gt;There are a few places where you can get the later versions.&lt;br /&gt;&lt;br /&gt;http://people.redhat.com/~jbaron/rhel4/RPMS.kernel/&lt;br /&gt;&lt;br /&gt;The above URL is updated even before, the repositories of CentOS are updated.&lt;br /&gt;&lt;br /&gt;http://mirror.centos.org/&lt;br /&gt;http://www.centos.org/modules/tinycontent/index.php?id=13&lt;br /&gt;&lt;br /&gt;Before proceeding further, you have to detemine the OS version by login to server via ssh and issuing the command&lt;br /&gt;&lt;br /&gt;cat /etc/redhat-release&lt;br /&gt;&lt;br /&gt;If the output of command is CentOS release 3.x (Final) , then you have to descend to the directory centos-3 and then the correct 3.x directory. (x can be 5, 6 or 7 depending on the version available at the time of your order)&lt;br /&gt;&lt;br /&gt;Again, if the output is CentOS release 4.x (Final), then you have to click the centos-4 directory and once inside, proceed to appropriate versions, depending on value of x in 4.x.&lt;br /&gt;&lt;br /&gt;Entering the updates/i386/RPMS/ directory , you will see lots of rpms alphabetically ordered. Look for kernel RPMs and you will see lots of RPMs, as below&lt;br /&gt;&lt;br /&gt;for CentOS release 4.x (Final) OSes, inside the http://mirror.centos.org/centos-4/4.3/updates/i386/RPMS/&lt;br /&gt;&lt;br /&gt;kernel-2.6.9-34.0.1.EL.i586.rpm                        24-May-2006 17:29   10M&lt;br /&gt;kernel-2.6.9-34.0.1.EL.i686.rpm                        24-May-2006 17:15   10M&lt;br /&gt;kernel-2.6.9-34.0.2.EL.i586.rpm                        07-Jul-2006 22:26   10M&lt;br /&gt;kernel-2.6.9-34.0.2.EL.i686.rpm                        07-Jul-2006 22:27   10M&lt;br /&gt;kernel-2.6.9-42.0.2.EL.i586.rpm                        23-Aug-2006 05:01   11M&lt;br /&gt;kernel-2.6.9-42.0.2.EL.i686.rpm                        23-Aug-2006 05:03   11M&lt;br /&gt;kernel-2.6.9-42.EL.i586.rpm                            12-Aug-2006 13:05   11M&lt;br /&gt;kernel-2.6.9-42.EL.i686.rpm                            12-Aug-2006 13:06   11M&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and it repeats for kernel-devel, kernel-hugemem, kernel-smp and kernel-doc directories.&lt;br /&gt;&lt;br /&gt;It is the highest numbered kernel which is of interest to us. You may also look&lt;br /&gt;at the timestamps, the latest kernel in the list is that uploaded on 23-Aug-2006, kernel-2.6.9-42.0.2.EL.i686.rpm.&lt;br /&gt;&lt;br /&gt;Now the question which is the architecture, you should choose. 99.99%, it is the i686 rpm. A output of the command 'uname -a' will show the architectures supported like,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Linux cookie.cuckoos.com 2.6.9-34.0.1.EL #1 Wed May 24 07:40:56 CDT 2006 i686 i686 i386 GNU/Linux&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Time to Upgrade&lt;br /&gt;==============&lt;br /&gt;&lt;br /&gt;I now know which is the RPM to be downloaded (here, kernel-2.6.9-42.0.2.EL.i686.rpm). I have downloaded it using wget using the command&lt;br /&gt;&lt;br /&gt;cd /usr/src/redhat&lt;br /&gt;wget -c http://mirror.centos.org/centos-4/4.3/updates/i386/RPMS/kernel-2.6.9-42.0.2.EL.i686.rpm&lt;br /&gt;rpm -ivh kernel-2.6.9-42.0.2.EL.i686.rpm&lt;br /&gt;&lt;br /&gt;Use the -i argument with the rpm  command to keep the old kernel. If the -U option is used to upgrade the kernel package, it will overwrite the currently installed kernel.&lt;br /&gt;&lt;br /&gt;If the system is a multi-processor system, install the kernel-smp packages as well &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;cd /usr/src/redhat/&lt;br /&gt;wget -c http://mirror.centos.org/centos-4/4.3/updates/i386/RPMS/kernel-smp-2.6.9-42.0.2.EL.i686.rpm&lt;br /&gt;rpm -ivh kernel-smp-2.6.9-42.0.2.EL.i686.rpm&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Configuring the BootLoader (GRUB)&lt;br /&gt;================================&lt;br /&gt;&lt;br /&gt;On installing the kernel rpm, (using -ivh option), it configures the GRUB boot loader to boot the newly installed kernel. However, it does not configure the boot loader to boot the new kernel by default. If you have used rpm -Uvh, option instead of ivh, it will configure the bootloader config, at /boot/grub/grub.conf (a symlink/shortcut from /etc/grub.conf also exists) to boot the new kernel as well.&lt;br /&gt;&lt;br /&gt;Now open up the file /boot/grub/grub.conf in your favorite editor and confirm that it contains a title section with the same version as the kernel package just&lt;br /&gt;installed, like that of below&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# Note that you do not have to rerun grub after making changes to this file&lt;br /&gt;# NOTICE:  You have a /boot partition.  This means that&lt;br /&gt;#          all kernel and initrd paths are relative to /boot/, eg.&lt;br /&gt;#          root (hd0,0)&lt;br /&gt;#          kernel /vmlinuz-version ro root=/dev/sda3&lt;br /&gt;#          initrd /initrd-version.img&lt;br /&gt;#boot=/dev/sda&lt;br /&gt;default=1&lt;br /&gt;timeout=5&lt;br /&gt;splashimage=(hd0,0)/grub/splash.xpm.gz&lt;br /&gt;hiddenmenu&lt;br /&gt;title CentOS (2.6.9-42.0.2.EL)&lt;br /&gt;     root (hd0,0)&lt;br /&gt;     kernel /vmlinuz-2.6.9-42.0.2.EL ro root=LABEL=/&lt;br /&gt;     initrd /initrd-2.6.9-42.0.2.EL.img&lt;br /&gt;title CentOS (2.6.9-34.0.2.EL)&lt;br /&gt;     root (hd0,0)&lt;br /&gt;     kernel /vmlinuz-2.6.9-34.0.2.EL ro root=LABEL=/&lt;br /&gt;     initrd /initrd-2.6.9-34.0.2.EL.img&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you don't have a separate /boot partition, the paths to the kernel and initrd image are relative to the / partition, like kernel /boot/vmlinuz-2.6.9-42.0.2.EL ro root=LABEL=/&lt;br /&gt;&lt;br /&gt;Notice that the default is not set to the new kernel. To configure GRUB to boot&lt;br /&gt;the new kernel by default, change the value of the default variable to the title section number for the title section that contains the new kernel. The count starts with 0. For example, if the new kernel is the second title section, set default to 1. However in our case, it is the first title and the default must be changed to 0.&lt;br /&gt;&lt;br /&gt;Cross your fingers and reboot. If it's all good, it will come back.&lt;br /&gt;&lt;br /&gt;FailSafe mode&lt;br /&gt;=============&lt;br /&gt;&lt;br /&gt;Since the kernel upgradation is via RPM, you dont have to worry about the boot failure. Still mentioning the grub's failsafe feature. Though Grub don't have a perfect failsafe boot mechanism as lilo, you can use it's 'failsafe' feature for&lt;br /&gt;booting the newly installed kernel for once and editing grub.conf after successful reboot. And in case the newly installed kernel doesn't come back, we can simply remote reboot the server and it will boot back to the default kernel as in grub.conf&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;code&gt;[root@server ~]# grub&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Screen will get refreshed and you will get grub shell as below&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt; GNU GRUB  version 0.95  (640K lower / 3072K upper memory)&lt;br /&gt;&lt;br /&gt;[ Minimal BASH-like line editing is supported.  For the first word, TAB lists possible command completions.  Anywhere else TAB lists the possible completions of a device/filename.]&lt;br /&gt;&lt;br /&gt;grub&gt;&lt;br /&gt;&lt;br /&gt;In the grub shell, enter these&lt;br /&gt;grub&gt; savedefault --default=0 --once&lt;br /&gt;grub&gt; quit&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;--default=0 is the first title, default=1 is the second title and so on as explained earlier.&lt;br /&gt;&lt;br /&gt;Once the server is successfully rebooted, login and then do a 'uname -a' to make sure that the new kernel is loaded and if it did, edit the grub.conf and make the newly installed kernel as default.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-3925607960097202410?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/3925607960097202410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=3925607960097202410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3925607960097202410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3925607960097202410'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/11/upgrading-kernel-in-centos.html' title='Upgrading kernel in CentOS'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-3211146939866942566</id><published>2006-11-23T03:17:00.000-08:00</published><updated>2006-11-24T02:40:48.202-08:00</updated><title type='text'>Tables in blogger and some good VI (ViM) Commands</title><content type='html'>Someone someday said something about VI - If I remember right, it was : Either learn Vi or learn unix. You can't do both in a life time. VI itself is a unix , millions of command or shorcuts hidden inside vi. When I say VI, I meant VIM. I joined orkut community of VI and is copying many of the useful (to me) commands discussed there to my blog. Copyleft wrongs belong Orkut VI community. &lt;br /&gt;&lt;br /&gt;BTW I must say it was VI which helped me to join all the pretty tables to a single line table, to avoid the huge space just above the table in a matter of secs. The command I used was :1,$join!&lt;br /&gt;&lt;br /&gt;Normal/Command Mode&lt;br /&gt;-------------------&lt;br /&gt;&lt;br /&gt;&lt;table border="0"&gt;      &lt;tbody&gt;         &lt;tr&gt;                    &lt;td&gt; cw&lt;/td&gt;                       &lt;td&gt;Delete a word and put in insert mode&lt;/td&gt;          &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;dw &lt;/td&gt;                      &lt;td&gt;Delete a word &lt;/td&gt;             &lt;/tr&gt;           &lt;tr&gt;                   &lt;td&gt;~  &lt;/td&gt;                        &lt;td&gt;Change the case letters &lt;/td&gt; &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;guu &lt;/td&gt;                     &lt;td&gt;lowercase line &lt;/td&gt;            &lt;/tr&gt;           &lt;tr&gt;                   &lt;td&gt;gUU &lt;/td&gt;                       &lt;td&gt;uppercase line &lt;/td&gt;          &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;ga &lt;/td&gt;                      &lt;td&gt;display hex,ascii value of character under cursor &lt;/td&gt;         &lt;/tr&gt;  &lt;tr&gt;                     &lt;td&gt;u &lt;/td&gt;                        &lt;td&gt;Undo &lt;/td&gt;             &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;Ctrl + R &lt;/td&gt;&lt;td&gt;Redo &lt;/td&gt;              &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;Alt + W &lt;/td&gt;                  &lt;td&gt;Move word by word &lt;/td&gt;               &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;G or ]] &lt;/td&gt;                 &lt;td&gt;Go to last line &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;                   &lt;td&gt;gg or [[ &lt;/td&gt;                  &lt;td&gt;Go to first line &lt;/td&gt;        &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;$  &lt;/td&gt;                      &lt;td&gt;Go to the end of line &lt;/td&gt;             &lt;/tr&gt;           &lt;tr&gt;           &lt;td&gt;0 &lt;/td&gt;                 &lt;td&gt;Go to the beginning of line &lt;/td&gt;     &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;ggdG&amp;nbsp;or&amp;nbsp;[[dG&amp;nbsp;or&amp;nbsp;[[d]]&lt;/td&gt;   &lt;td&gt;Delete the entire lines of a file &lt;/td&gt;         &lt;/tr&gt;           &lt;tr&gt;   &lt;td&gt;^g &lt;/td&gt;                        &lt;td&gt;Display current line number on the bottom (every detail:-)) &lt;/td&gt;              &lt;/tr&gt;           &lt;tr&gt;           &lt;td&gt;cc &lt;/td&gt;                        &lt;td&gt;Cut the line, leaving a blank line there &lt;/td&gt;         &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;dd &lt;/td&gt;                       &lt;td&gt;Delete the line (similar to cc, but wont leave a blank line) &lt;/td&gt;             &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;yy &lt;/td&gt;                       &lt;td&gt;Yank/Copy a line &lt;/td&gt;         &lt;/tr&gt;  &lt;tr&gt;                     &lt;td&gt;p &lt;/td&gt;                        &lt;td&gt;Paste the line just cc'ed or dd'ed or yy'ed &lt;/td&gt;          &lt;/tr&gt;          &lt;tr&gt;                     &lt;td&gt;. &lt;/td&gt;                        &lt;td&gt; Yes, that's a dot. (Period). Repeats the last command executed in normal mode    &lt;/td&gt;            &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;/word &lt;/td&gt;   &lt;td&gt;Search for the word, 'word' in the document &lt;/td&gt;              &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt; %&lt;/td&gt;                       &lt;td&gt;To match appropriate brace close for an open brace &lt;/td&gt;               &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;J &lt;/td&gt;                       &lt;td&gt;Join 2 lines. To join more than one line (say 10) press : 10 shift+j &lt;/td&gt;              &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;D                 &lt;/td&gt;                    &lt;td&gt;Delete from cursor to end of line&lt;/td&gt;            &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;X                  &lt;/td&gt;          &lt;td&gt;backspace                   &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;           &lt;td&gt;x                   &lt;/td&gt;                   &lt;td&gt;Delete character under cursor                      &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;                   &lt;td&gt;ma                  &lt;/td&gt;                   &lt;td&gt;Mark the current line as "line a"                        &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;   &lt;td&gt;mb                  &lt;/td&gt;                   &lt;td&gt;Mark the current line as "line b"                        &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;   &lt;td&gt;'a                      &lt;/td&gt;                   &lt;td&gt;Return to the line marked "a"                    &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;   &lt;td&gt;d'a or y'a                  &lt;/td&gt;                   &lt;td&gt;delete or copy the line marked a                   &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;   &lt;td&gt;/\&amp;lt;\d\{4}\&amp;gt;                   &lt;/td&gt;                   &lt;td&gt;Search for exactly 4 digit numbers                 &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;   &lt;td&gt;/\&amp;lt;\a\{4}\&amp;gt;                   &lt;/td&gt;                   &lt;td&gt;Search for 4 letter words                  &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;           &lt;td&gt;/first\_s*second/i  &lt;/td&gt;   &lt;td&gt;Search for first followed second on a new line                     &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;                   &lt;td&gt;/bugs\(\_.\)*bunny                  &lt;/td&gt;                   &lt;td&gt;bugs followed by bunny anywhere in file                    &lt;/td&gt;           &lt;/tr&gt;          &lt;tr&gt;                     &lt;td&gt;/^\n\{3}                   &lt;/td&gt;                  &lt;td&gt;Find 3 empty lines                  &lt;/td&gt;           &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Ex Mode&lt;/p&gt;-----------&lt;p&gt;By Ex mode I mean the executable mode, where the command starts with a colon [ : ]&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;table border="0"&gt;    &lt;tbody&gt;         &lt;tr&gt;                    &lt;td&gt;:help &lt;/td&gt;           &lt;td&gt; Vi's inbuilt help&lt;/td&gt;             &lt;/tr&gt;           &lt;tr&gt;           &lt;td&gt;:%s/OlD/new/g &lt;/td&gt;                     &lt;td&gt;Replace 'OlD' with 'new' word all over the document / file &lt;/td&gt;               &lt;/tr&gt;  &lt;tr&gt;                     &lt;td&gt;:%s/OlD/new/gi &lt;/td&gt;                   &lt;td&gt;Same results as above, but case insensitive replacements &lt;/td&gt;         &lt;/tr&gt;  &lt;tr&gt;                     &lt;td&gt;:s/old/new/g &lt;/td&gt;                     &lt;td&gt;Replace 'old' word with 'new' word in the line at which cursor is currently pointed at &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;                   &lt;td&gt;:2,5s/old/new/g &lt;/td&gt;                   &lt;td&gt;Replace old with new from line number two to five &lt;/td&gt;                &lt;/tr&gt;           &lt;tr&gt;           &lt;td&gt;:%s/\r/\r/g &lt;/td&gt;                       &lt;td&gt;Turn DOS returns ^M into real returns. I usally do a search and replace of Ctrl+v Ctrl+m.&lt;/td&gt;             &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;:%s/^\(.*\)\n\1$/\1/ &lt;/td&gt;    &lt;td&gt;Delete duplicate lines, which are together &lt;/td&gt;                &lt;/tr&gt;  &lt;tr&gt;                     &lt;td&gt;:shell &lt;/td&gt;                   &lt;td&gt;Escape to shell to do anything then exit returning to vi &lt;/td&gt;         &lt;/tr&gt;          &lt;tr&gt;                     &lt;td&gt;:q &lt;/td&gt;                       &lt;td&gt;Quit :-D &lt;/td&gt;         &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;:x, :wq            &lt;/td&gt;                    &lt;td&gt;Save and Quit &lt;/td&gt;            &lt;/tr&gt;          &lt;tr&gt;                     &lt;td&gt;ZZ &lt;/td&gt;                       &lt;td&gt;Quit equivalent to :wq! &lt;/td&gt;          &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;:ma a &lt;/td&gt;                    &lt;td&gt;ma is the command and a is the argument. Marks the point where cursor is present as a. (But it explicitly wont show it). Now if you want to copy somthin from some other point to the point 'a' , keep the cursor at the other point and type y'a (in escape mode) (y can be replaced by d and so on). &lt;/td&gt;               &lt;/tr&gt;           &lt;tr&gt;           &lt;td&gt;:r!cmd &lt;/td&gt;                    &lt;td&gt;r followed by shell command, reads the command o/p and paste in a line just below cursor. &lt;/td&gt;               &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;:rew! &lt;/td&gt;                   &lt;td&gt;rew! is for rewind. Clear all the buffers and the files to initial state of editing. &lt;/td&gt;              &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;:set nu &lt;/td&gt;                  &lt;td&gt;Display line numbers &lt;/td&gt;            &lt;/tr&gt;            &lt;tr&gt;                    &lt;td&gt;:%! nl -ba &lt;/td&gt;              &lt;td&gt;Enough display, really number the lines&lt;/td&gt;         &lt;/tr&gt;           &lt;tr&gt;   &lt;td&gt;:sp &lt;/td&gt;                       &lt;td&gt;it splits your screen and ^W - to move between windows &lt;/td&gt;           &lt;/tr&gt;           &lt;tr&gt;                   &lt;td&gt;:X &lt;/td&gt;                        &lt;td&gt;prompts for an encryption key.   After writing your key, if you save your document   it will be encrypted and no one else (but you and vim)   can read your documents.  If you reopen the file, VIM will ask for the key.  If you want to disable encryption, just type  :set key= &lt;/td&gt;          &lt;/tr&gt;          &lt;tr&gt;                     &lt;td&gt;:%!xxd &lt;/td&gt;                   &lt;td&gt;view in Hex format &lt;/td&gt;               &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;%!xxd -r &lt;/td&gt;                 &lt;td&gt;Revert to Normal format from Hex format &lt;/td&gt;          &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt; &lt;/td&gt;        &lt;td&gt; &lt;/td&gt;          &lt;/tr&gt;           &lt;tr&gt;                    &lt;td&gt;:g/^\s*$/d &lt;/td&gt;                       &lt;td&gt;Delete all blank lines&lt;/td&gt;         &lt;/tr&gt;  &lt;tr&gt;                     &lt;td&gt;:v/./.,/./-1join &lt;/td&gt;                 &lt;td&gt;compress empty lines (two or three lines to 1) &lt;/td&gt;           &lt;/tr&gt;          &lt;tr&gt;                     &lt;td&gt;:s/\(.*\)\&amp;nbsp;\(.*\)/\2&amp;nbsp;\1/g          &lt;/td&gt;                    &lt;td&gt;Shift the last word of the line to the first, first to second and so on. %s - will do it for entire file                   &lt;/td&gt;  &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;That's all for now. I will add more as I learn more. I need to learn the basics of advanced VI, playing with the registers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-3211146939866942566?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/3211146939866942566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=3211146939866942566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3211146939866942566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/3211146939866942566'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/11/some-good-vi-vim-commands.html' title='Tables in blogger and some good VI (ViM) Commands'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-4934620103263638741</id><published>2006-11-22T18:51:00.000-08:00</published><updated>2006-12-12T02:52:17.940-08:00</updated><title type='text'>Dictionary attack spamming on cpanel servers</title><content type='html'>Never again..It was bad and tough to fight against the Dictionary attack spamming. Either the server load will rise or&lt;br /&gt;&lt;br /&gt;Dictionary attack&lt;br /&gt;-----------------&lt;br /&gt;&lt;br /&gt;From wikipedia :&lt;br /&gt;&lt;br /&gt;Spammers may also use a form of dictionary attack in order to harvest e-mail addresses. For example, a spammer may send messages to adam@example.com, betty@example.com, carl@example.com, etc. Any addresses to which messages are delivered, as opposed to being bounced back, the spammer can then add to his or her sending list.&lt;br /&gt;&lt;br /&gt;My issue was that, the attacker was spamming the domain in such a way that in matter of seconds, the cPanel server, which had the setting of smtp_accept_max = 150 will show&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Connection refused from [xx.xx.xx.xx] : too many connections&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;not allowing other legit customers to send and receive emails. The spammers were targetting only one domain and I didnt have to go for some automate application.&lt;br /&gt;&lt;br /&gt;RBLs were not working as expected and had to end up using acl_smtp_connect (Exim 4.53), It was dropping after a connection is made.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;acl_smtp_connect = check_host&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Touched two files, /etc/eximwhites and /etc/eximblacks and just after begin  acl, added this&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;check_host:&lt;br /&gt; accept&lt;br /&gt; hosts = /etc/eximwhites&lt;br /&gt;&lt;br /&gt; deny&lt;br /&gt;         log_message = match eximblacks&lt;br /&gt;         hosts = /etc/eximblacks&lt;br /&gt; accept&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I could configure ACL to use the RBL in the connect, but 50% of many spammer IPs being used was not on any RBL lists. So executed two piped commands as below to start with,&lt;br /&gt;&lt;br /&gt;For adding server Ips to white list&lt;br /&gt;&lt;br /&gt;ifconfig | grep 'inet addr' | cut -d ":" -f 2 | cut -d " " -f 1 &gt;&gt; /etc/eximwhites&lt;br /&gt;&lt;br /&gt;To add spammer's IP to black list. Replace example.com with the domain under attack.&lt;br /&gt;&lt;br /&gt;grep example.com /var/log/exim_mainlog | grep "rejected RCPT" | cut -d "[" -f 2 | cut -d "]" -f 1 | sort | uniq &gt;&gt; /etc/eximblacks&lt;br /&gt;&lt;br /&gt;Do appropriate greps. This one worked for me. &lt;br /&gt;&lt;br /&gt;wohoo. eximblacks file had 800+ IPs all on a sudden. And those IPs were rejected at the time of connection itself, before the SMTP banner or greeting sending the "550 administrative prohibition".&lt;br /&gt;&lt;br /&gt;Cleared the log and finally restarted exim and made sure that there are no errors reported in the /var/log/exim_mainlog. All was fun after that, problem solved and no more connection refused errors. This is not a perfect solution, but worked for me.&lt;br /&gt;&lt;br /&gt;Update : This solution again worked for me today, but this time, I had to execute the script every 15s to get things under control. There were 20000 IPs and it took me an hour. I need a better solution. Any suggestions ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-4934620103263638741?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/4934620103263638741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=4934620103263638741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4934620103263638741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4934620103263638741'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/11/dictionary-attack-spamming-on-cpanel.html' title='Dictionary attack spamming on cpanel servers'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-4903077827186120173</id><published>2006-11-19T19:15:00.000-08:00</published><updated>2006-11-19T19:26:26.377-08:00</updated><title type='text'>ImageMagick and errors</title><content type='html'>ImageMagick always causes trouble with versions. Either we have to upgrade, downgrade or install some other packages like PerlMagick to get it work. This time it was the usage of Image::Magick perl module and was getting the errors.&lt;br /&gt;&lt;blockquote&gt; Can't load '/usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/Image/Magick/Magick.so' for module Image::Magick: libMagick.so.10: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.7/i686-linux/DynaLoader.pm line 230.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I dont know of a proper solution to this. But the steps I did, solve the issue. &lt;a href="http://www.faqts.com/knowledge_base/view.phtml/aid/361/fid/50"&gt;ldconfig&lt;/a&gt; (ldconfig scans a running system and sets up the symbolic links that are used to load shared libraries properly. It also creates a cache (/etc/ld.so.cache) which speeds the loading of programs which use shared libraries.)  was not considering /usr/local/lib where the ImageMagick was installed and once it was fixed everything was working.&lt;br /&gt;&lt;br /&gt;edited /etc/ld.so.conf&lt;br /&gt;Added /usr/local/lib as a new line and saved the file.&lt;br /&gt;Ran ldconfig :-)&lt;br /&gt;&lt;br /&gt;That did the trick.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-4903077827186120173?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/4903077827186120173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=4903077827186120173' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4903077827186120173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/4903077827186120173'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/11/imagemagick-and-errors.html' title='ImageMagick and errors'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-115880909470646383</id><published>2006-09-20T19:50:00.000-07:00</published><updated>2006-10-16T23:01:22.824-07:00</updated><title type='text'>MySQL - LOAD DATA INFILE and cPanel</title><content type='html'>I wanna convert this blog as a NoteKeeper, a Dairy , a Friend , a NewsPaper and everything else I feels at that very moment. As my father always say I start a job with great enthu, but will burn out soon. I bet him for this blog!!!&lt;br /&gt;&lt;br /&gt;So at this time it is about the LOAD DATA INFILE thing for which I had to spend around 10 mins to figure what is wrong with the command. The server do allow LOAD DATA INFILE thing, but the client was getting Access Denied (well actually better thing compared to Not allowed on this server error). I confirmed that we do allow it, by taking mysql prompt and entering show variables and it showed&lt;br /&gt;&lt;br /&gt;local_infile                    ON&lt;br /&gt;&lt;br /&gt;Happy now..but why the issue of access denied. Ctrl + C and Ctrl + Ved a small code&lt;br /&gt;&lt;code&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$db &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mysql_connect&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'localhost'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'db_user'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'password'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {&lt;br /&gt;print &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"connected!"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;br /&gt;} else {&lt;br /&gt;print &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"could not connect" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mysql_error&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mysql_select_db&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'db_name'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$db&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {&lt;br /&gt;print &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;br /&gt;database accessed!"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;br /&gt;} else {&lt;br /&gt;print &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"could not access database!" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mysql_error&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$query &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"LOAD DATA INFILE '/home/username/csv_data_to_import.txt'&lt;br /&gt;INTO TABLE table_name&lt;br /&gt;FIELDS TERMINATED BY ','&lt;br /&gt;ENCLOSED BY '\"'&lt;br /&gt;LINES TERMINATED BY '\n'&lt;br /&gt;IGNORE 1 LINES"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;br /&gt;if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mysql_query&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$query&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$db&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {&lt;br /&gt;echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;br /&gt;wohoo! loaded!"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;br /&gt;} else {&lt;br /&gt;print &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&lt;br /&gt;failed!" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mysql_error&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;();&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;Added a LOCAL keyword and it started working. Now the question was why :-P I was puzzled till I carefully read the documentation at http://dev.mysql.com/doc/refman/4.1/en/load-data.html which read&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; Note that, in the non-&lt;code class="literal"&gt;LOCAL&lt;/code&gt; case, these rules         mean that a file named as &lt;code class="filename"&gt;./myfile.txt&lt;/code&gt; is         read from the server's data directory, whereas the file named as         &lt;code class="filename"&gt;myfile.txt&lt;/code&gt; is read from the database         directory of the default database. For example, if         &lt;code class="literal"&gt;db1&lt;/code&gt; is the default database, the following         &lt;code class="literal"&gt;LOAD DATA&lt;/code&gt; statement reads the file         &lt;code class="filename"&gt;data.txt&lt;/code&gt; from the database directory for         &lt;code class="literal"&gt;db1&lt;/code&gt;, even though the statement explicitly         loads the file into a table in the &lt;code class="literal"&gt;db2&lt;/code&gt;         database:&lt;/blockquote&gt;&lt;br /&gt;which basically meant, if I have to use LOAD DATA INFILE (without LOCAL keyword, I have to copy the csv to /var/lib/mysql/db_name or to the temp database directory (?) and use the csv location appopriately. Anyways the story ended fine. The prince married the princess and happily lived thereafter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-115880909470646383?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/115880909470646383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=115880909470646383' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/115880909470646383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/115880909470646383'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/09/mysql-load-data-infile-and-cpanel.html' title='MySQL - LOAD DATA INFILE and cPanel'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34735857.post-115875195332747590</id><published>2006-09-20T04:29:00.000-07:00</published><updated>2006-10-16T23:01:22.740-07:00</updated><title type='text'>First one for previewing the template</title><content type='html'>I thought I would make my first post a grand one just like the karimeen (Pearl Spot Fish) at Grand Hotel :-P But for previewing my blog template , they say, I would need to have atleast one post. So here it is. I will add blogger emoticons as well. Let me find and do some touchings before I start blogging..&lt;br /&gt;&lt;br /&gt;I hope this blogging wont become my yet another flash in the pan attempt :-)&lt;br /&gt;&lt;br /&gt;BTW I am using the template from &lt;a href="http://blogspottemplates.blogspot.com/"&gt;BlogSpot Templates&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34735857-115875195332747590?l=hackthetech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hackthetech.blogspot.com/feeds/115875195332747590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34735857&amp;postID=115875195332747590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/115875195332747590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34735857/posts/default/115875195332747590'/><link rel='alternate' type='text/html' href='http://hackthetech.blogspot.com/2006/09/first-one-for-previewing-template.html' title='First one for previewing the template'/><author><name>HJKL a.k.a h2l</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
