nVidia Display Driver with Fedora Core 5 -- Upgrade Notes
Tue, 04/04/2006 - 14:42 — sandipThe upgrade from fedora core 4 to fedora core 5 went fairly well ( using the upgrade method mentioned here... ) except for a hiccup with the X display using the current nVidia driver. Luckily Stanton Finley maintains an upto date FC5 installation notes with which I was able to quickly troubleshoot the nvidia display driver.
Here is a synopsis of what I did to fix it:
updated nvidia driver 1.0-8178 on 2.6.16-1.2069 kernel for Linux/x86
Mon, 04/03/2006 - 08:42 — sandipIf you have updated to the latest FC4 kernel -- kernel-2.6.16-1.2069_FC4 and the nvidia driver will not compile with this version ( errors out while trying to compile a kernel module with NVIDIA-Linux-x86-1.0-8178-pkg1
I have repackaged the updated 1.0-8178 driver into a custom .run package and can be downloaded here -- NVIDIA-Linux-x86-1.0-8178-pkg0
md5sum: 4a6afb103e18a9263df71861752133
Reset MySQL root Password
Thu, 03/30/2006 - 10:39 — sandipRecently, I forgot the root password for MySQL and went about resetting it as below:
-
Stop mysqld and restart it with:
# service mysqld stop # mysqld_safe --skip-grant-tables --user=rootConnect to the mysqld server with this command:
sql> mysql -u rootIssue the following statements in the mysql client:
mysql> UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root'; mysql> FLUSH PRIVILEGES;
Replace “newpassword
Drifting Mouse problem on Dells - Solution for Linux Fedora Core 4
Mon, 03/27/2006 - 10:30 — sandipI have had a Dell Latitude D800 for over a year now and recently had the dreaded "Drifting Mouse" problem as discussed in the Dell Support Forum.
Fortunately, I also came across a linux solution which talks about disabling the "Stick Pointer" using the "Synaptics Driver" which comes default with FC4.
Here is the gist of it which worked for me:
How to fix _Can't open file: 'sessions.MYI'_ in Drupal
Fri, 03/10/2006 - 23:57 — sandipThis seems to occur if mysql crashes for some reason and corrupts the sessions table for Drupal.
Here is a quick way to resolve this and I have used it in the past...
mysql> REPAIR TABLE sessions QUICK;
You can also use phpmyadmin to repair the table.
Related Reading: MySQL Database Repair
Eliminate Command Line Histories with chattr (change attribute)...
Fri, 03/10/2006 - 10:26 — sandipIf you use bash as the default shell, it keeps a history of commands accessed via the `history` command for convenience. This could end up being a security problem if someone were able to compromise a users' home directory. In some cases, this could expose improperly used passwords or special privileges available to the user such as sudo.
Consider disabling this by changing the attribute of the file to lock out the ability to update the file. As root:
# cat /dev/null > ~user/.bash_history # chattr +i ~user/.bash_history
The user will still have a command line history, but it will only apply to the current session. When the user logs out, the information will not be saved. To have this apply to all future users, make the changes in the "/etc/skel" directory.
Compiling support for XSLT in PHP
Fri, 02/24/2006 - 22:49 — sandipXSLT, Extensible Stylesheet Language (XSL) Transformations is a language for transforming XML documents into other XML documents. It is a standard defined by The World Wide Web Consortium (W3C). Information about XSLT and related technologies can be found at http://www.w3.org/TR/xslt.
PHP XSLT extension only supports the Sablotron library from the Ginger Alliance. The extension does not come standard with Redhat Enterprise... and the compilation was a bit tricky. So if you are having difficulty, theses notes may help you some...
Training SpamAssassin
Sat, 02/11/2006 - 00:42 — sandipI use SquirrelMail and seperate out my missed spam email to a "Train/SPAM" folder and the wrongly tagged ones to "Train/HAM" folder and automate the process of training SpamAssassin via a daily cron.
Put the "SAtrain.sh" file in "/etc/cron.daily" directory.
#!/bin/bash # SAtrain.sh # Trains SpamAssassin with Spam and Ham mbox feeds... # Put this file in "/etc/cron.daily" directory. # chmod 700 "/etc/cron.daily/SAtrain.sh"echo "Training SpamAssassin Begin:" echo "Learning from Spam..." /usr/bin/sa-learn --spam --configpath=/etc/mail/spamass assin --showdots --mbox /home/user/mail/Train/Spam sleep 10 echo "Learning from Ham..." /usr/bin/sa-learn --ham --configpath=/etc/mail/spamass assin --showdots --mbox /home/user/mail/Train/Ham sleep 10 echo "Clearing Spam Feed..." cat /dev/null > /home/user/mail/Train/Spam echo "Clearning Ham Feed..." cat /dev/null > /home/user/mail/Train/Ham echo "Training SpamAssassin Completed!"
With spamassassin trained daily and my "required_hits set to 1.9" in my "~/.spamassassin/user_prefs" file, I have been able to get an accuracy of emails being tagged as spam for about 99.9% of my emails... Woohooo!!
Related Reading:
AutoReject Rogue Virus / Worm Mail generating infected IP via sendmail access list
Wed, 02/01/2006 - 12:01 — sandipMailScanner is good at filtering out the emails with attached worms and viruses. However, it does this at the expense of a high server cpu load when there is a sudden influx of auto-generated email bombardment from an IP that has been infected.
Most recent of which causing havoc is the Nyxem.E (aliases: Email-Worm.Win32.Nyxem.e, Kama Sutra, W32/MyWife.d@MM) worm set to execute on the third of each month (e.g. February 3, 2006).
Here is a quick documentaion of what I have done to autoreject emails from ISPs that are generating rogue emails.
How to create a favicon (icon displayed in the browsers location bar) with Gimp
Sun, 01/29/2006 - 19:10 — sandipIf you notice your http error logs with a lot of messages such as "File does not exist: ... favicon.ico". You are missing an icon for your website which is displayed in the browsers location bar and also within the browser bookmarks.
Here's an easy way to create one with Gimp:
-
Open the image you want to create the icon for, with Gimp.
Resize the image to a 16x16 pixel.
When you go to save, "Select File Type (By Extension)".
Save as "Microsoft Windows Icon" -- ico .
Name it "favicon.ico".
Upload the favicon.ico file to the websites home directory.
When you visit your website, you should now have a cool new icon displayed within the browsers location bar!!