Scooby with 2 Golden Retrievers – Teddy and Goldie
24 Saturday Dec 2011
24 Saturday Dec 2011
12 Monday Dec 2011
Today, we got Scooby’s nail (near the pastern) removed because it was hurting him real bad. We stopped clipping his nail when it bled once and was afraid to cut it again. But, the one you see in the snap below is an overgrown nail and it broke off from inside and was hanging with the vein inside. So, took him to the vet this morning and got it removed. He is still drowsy as he was sedated when the nail was being removed.
07 Wednesday Dec 2011
Today, I have moved most of my Tech stuffs off from my personal blog. You will see in the menu, a section named “My Tech Blog” which is a separate blog KernelCraft and I’ll be updating this section as and when the time permits.
02 Friday Dec 2011
Posted Technology
inThis one is quite simple, but few guys have asked me to jot down on how to to auto mount the filesystem using autofs.
Autofs is a kernel option that lets you automatically mount filesystem to your computer as and when you use them. You can set a time stamp so it automatically unmounts when not in use. You can auto mount anything.. you name it, a flash drive, external harddisk, CD-ROM, Windows Partition (in case you are dual booting linux and windows on your laptop).
This is how it’s done.
Create a new directory (mkdir /media) so it can be used as a directory for mount point:
Now, go to /etc/auto.master and include the following lines:
/media /etc/auto.isomount –timeout=60
The above line tells autofs to create a new directory /media, read from auto.isomount to find out any mount points that might exist there and to time out after 60 seconds of idling.
So, now we have to create new file /etc/auto.isomount and include the following line:
centos6 -fstype=iso9660,ro,loop :/root/CentOS-6.0-i386-bin-DVD.iso
The first column is the name of the directory mountpoint I want to use, so these lines would automount their devices when /media/centos is accessed. The second column sets up any mounting options you want to use for these individual filesystems, separated by commas. The third column is to list what device you wish to mount.
Once you create this file, simply restart autofs as follows:
/etc/init.d/autofs restart (or) service autofs restart
Note, you only have to restart autofs when you edit /etc/auto.master. You can edit any of the other configuration files on the fly how you like, and won’t have to restart autofs for the changes to take effect.
Now, whenever you go to /media/centos6 folder, you get the contents inside the “CentOS-6.0-i386-bin-DVD.iso” file.
Similary, I have these in my auto.master file:
/usb /etc/auto.usb –timeout=60
/winxp /etc/auto.xp –timeout=60
/etc/auto.usb and /etc/auto.xp has the following lines respectively:
pendrive -fstype=vfat,rw :/dev/sdb1
xp -fstype=ntfs,rw,allow_other,blksize=4096 :/dev/sda1
So now, you have /usb/pendrive contents from your flash drive or external hdd and /winxp/xp contains all your files from Windows partition. If you have a GUI, you can create a symlink to the above files so you don’t have to remember the autofs mount paths. Just double click on those symlink files and you will be able to automount the filesystem.
Hope this helps.
02 Friday Dec 2011
Posted Technology
inRecently, I bumped into iScanner, an open source tool for scanning your files for any malicious code and malwares from your *nix server. This tool can even scan any website URL directly from the shell. It creates a log file with information on infected codes. It can remove web based malware, hidden iframe tags, vbscript, javascript, activex objects, suspecious PHP codes etc.
You can download iScanner from http://iscanner.isecur1ty.org/download.html
Extract the tar file, and since the tool doesn’t need any external libraries other than having ruby installed, you just have to run ./iscanner with the following options as per your need:
You can use iScanner as follows:
iscanner -R http://kernelcraft.wordpress.com (Scans this website for any malicious codes).
iscanner -F /home/user/file.php (Scans a specific file)
iscanner -f /home/user (Scans this particular directory)
iscanner -f /home/user -m user@domain-email.com (Sends the copy of the infected log to this particular email address)
iscanner -c infected.log (This option cleans the infected files by removing the malicious code without deleting the infected files)
iscanner -b -c infected.log (Creates a backup of the original infected file before cleaning it)
iscanner -r backup/ (This restores the file from backup directory)
There are more options. Please check documentation (http://iscanner.isecur1ty.org/documentation.html) for more information on this.