Archive for September, 2012

How to disable Microsoft Widnows XP annoying Updates Available / Updates disabled notification

Sunday, September 30th, 2012

veryone knows, how M$ Windows updates the PC at stake. Besides that you know if updates are Disabled, the annoying picture showing a red like X under bottom left (Start menu panel) corner. Even if updates are Enabled often on the bottom part there is the yellow ! sign pushing the user to update:

Microsoft Windows Your Computer might be at risk menu screenshot

Thanksfully there is work around. To remove notification use:


Start (Menu) -> Control Panel -> Security Center -> Change the way Security center alerts me

Microsoft Windows XP SP3 Security Center - Change the way Security Center alerts me

Windows XP alert settings change disable automatic updates

No more update notifications. Enjoy 🙂

How to install binary packages on older FreeBSD releases / Install binary packages on FreeBSD 7.2

Saturday, September 29th, 2012

If you’re in a situation like, me where you run some old verison of FreeBSD and you need to install a bunch of packages let’s say GNOME Desktop environment on a host which before was used as a network router / mail server and general firewall. You will probably be surprised the usual way to install a pre-compiled BSD binaries with pkg_add -vr packagename will no longer work, i.e.:


freebsd# pkg_add -vr gnome2
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.2-release/Latest/gnome2.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.2-release/Latest/gnome2.tbz' by URL
pkg_add: 1 package addition(s) failed

The reason why binary package fetch and install no longer work is obvious the repository link ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.2-release/Latest/ which was previously working no longer works.

So to install be able to install this already obsolete compiled packages what is neccessery is to explicitly change the FTP location, where the packages will be looked for with a location to a working link corresponding to your FreeBSD version. To make sure the link is working in accordance with your FreeBSD release do a search in Google and get the proper FTP link. My BSD version is RELEASE 7_2, hence after a quick look in Google, I found a binary repository containing packages for my FreeBSd under link:


ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-7.2-release/Latest

To change the default set binary .tgz packages repository to the newer correct one for the currently logged in user via tty or over ssh use the csh / bash PACKAGESITE variable.
Whether in csh type:


freebsd# setenv PACKAGESITE ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-7.2-release/Latest/

Either if you use Bourne Again (bash) shell type;


[root@freebsd ~]# export PACKAGESITE="ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-7.2-release/Latest/"
[root@freebsd ~]#

Just as a matter of fact it is useful to say pkg_add command uses FreeBSD (Linux wget like) fetch to download the pre-compiled binaries. In other words the PACKAGESITE var is understood by fetch command, whether it is looking for some shell exported vars 🙂
To make the new PACKAGESITE setting permanent in csh include it in /root/.cshrc:


echo 'setenv PACKAGESITE ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-7.2-release/Latest/' >> /root/.cshrc

If your root user is set to use bash add it to /root/.bashrc


echo 'export PACKAGESITE="ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-7.2-release/Latest/"' >> /root/.bashrc

That’s all now you will now be able to install pre-compiled packages via pkg_add 🙂 Enjoy!

Make QMAIL with vpopmail vchkpw, courier-authlib and courier-imap auth work without MySQL on Debian Linux qmailrocks Thibs install

Friday, September 28th, 2012

How to make qmail vpopmail vchkpw courier-authlib and courier-imap work storing mails on hard disk with qmailrocks Thibs install

Recently installed a new QMAIL, following mostly Thibs Qmailrocks install guide. I didn’t followed literally Thibs good guide, cause in his guide in few of the sections like Install Vpopmail he recommends using MySQL as a Backend to store Vpopmail email data and passwords; I prefer storing all vpopmail data on the file system as I believe it is much better especially for tiny QMAIL mail servers with less than 500 mail box accounts.

In this little article I will explain, how I made Vpopmail courier-authlib and courier-imap play nice together without storing data in SQL backend.

1. Compile vpopmail with file system data storage support

So here is how I managed to make vpopmail + courier-authlib + courier-imap, work well together:

First its necessery to compile Vpopmailin store all its users data and mail data on file system. For this in Thibs Vpopmail Intsall step compiled Vpopmail without support for MySQL, e.g. instead of using his pointed compile time ./configure, arguments I used:


# cd /downloads/vpopmail-5.4.33
# ./configure \
--enable-qmaildir=/var/qmail/ \
--enable-qmail-newu=/var/qmail/bin/qmail-newu \
--enable-qmail-inject=/var/qmail/bin/qmail-inject \
--enable-qmail-newmrh=/var/qmail/bin/qmail-newmrh \
--enable-tcprules-prog=/usr/bin/tcprules \
--enable-tcpserver-file=/etc/tcp.smtp \
--enable-clear-passwd \
--enable-many-domains \
--enable-qmail-ext \
--enable-logging=y \
--enable-auth-logging \
--enable-libdir=/usr/lib/ \
--disable-roaming-users \
--disable-passwd \
--enable-domainquotas \
--enable-roaming-users
....
....
# make && make install-strip
# cat > ~vpopmail/etc/vusagec.conf < < __EOF__
Server:
Disable = True;
__EOF__
echo 'export PATH=$PATH:/var/qmail/bin/:/home/vpopmail/bin/' > /etc/profile.d/extrapath.sh
chmod +x /etc/profile.d/extrapath.sh
source /etc/profile

A tiny shell script with all above options to compile (qmail) vpopmail without MySQL / PostgreSQL support is here

For other steps concerning creation of vpopmail/vchkpw – user/group just follow as Thibs suggests.

2. Compile and install courier-authlib-0.59.1

I’ve made mirror of courier-authlib.0.59.1.tar.gz cause this version includes support for vchkpw without mysql, its a pity newer versions of courier-authlib not any more have support for vpopmail to store its data directly on the hard disk.

Then on downlaod, compile && install courier-authlib:

Download authlib courier-authlib.0.59.1.tar.gz – (I made mirror of courier-authlib.0.59.1.tar.gz you can use my mirror or download it somewhere else from the net):


# cd /usr/local/src
# wget -q https://www.pc-freak.net/files/courier-authlib.0.59.1.tar.gz
# tar -zxvvf courier-authlib.0.59.1.tar.gz

Compile courier-authlib

# ./configure --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkpw --without-authldap --without-authmysql --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib
....
# make && make install && make install-strip && make install-configure
....

On Debian Squeeze, this version of courier-authlib compiles fine, on Debian Lenny I use it too and there it is okay.

Unless above commands returns a compile error authlib will be installed inside /usr/local/libexec. If you get any errors it is most likely due to some missing header files. The error should be self explanatory enough, but just in case you have troubles to find what deb is necessery to install, please check here the complete list of installed packages I have on the host . In case of problems the quickest way (if on Debian Squeeze) is to install same packages, type:


# wget -q https://www.pc-freak.net/files/list_of_all_deb_necessery_installed_packages_for_authlib.txt
# for i in $(cat list_of_all_deb_necessery_installed_packages_for_authlib.txt |awk '{ print $2 }'); do
apt-get install --yes $i;
done

This is for the lazy ones though it might install you some packs you don’t like to have on your host, so just install it in case you know what you’re doing 🙂

Next step is to set proper configuration for courier-authdaemon.

3. Configure courier-authlib in /usr/local/etc/authlib

Again for the lazy ones I have prepared a good config which is working 100% with vpopmail configured to store mails on the file system, to install the “good” configs, fetch mine and put them in proper location, e.g.:


# cd /usr/local/etc
# wget -q https://www.pc-freak.net/files/authlib-config-for-qmail-with-hdd-directory-stored-userdata.tar.gz
# tar -zxvvf authlib-config-for-qmail-with-hdd-directory-stored-userdata.tar.gz
....

For those who prefer not to use my configuration as pointed above, here is what you will need to change manually in configs:

Edit /usr/local/etc/authlib/authdaemonrc and make sure there variable authmodulelist and authmodulelist and daemons=5
equals to:


authmodulelist="authvchkpw"


authmodulelistorig="authuserdb authpgsql authldap authmysql authcustom authvchkpw authpipe"


daemons=10

Bear in mind here the setting daemons, will set how many maximum parallel connections should be possible to authdaemond on new IMAP fetch mail user requests. Setting it to 10 will allow your mail server to support up to 10 users to paralelly check your mail for a tiny mail server this setting is okay if you expect higher number of parallel mail users raise the setting to some setting fitting your needs.

P.S. On some qmail installations this value has created weird problems and took me hours to debug the whole mess is caused by this setting, make sure you plan it now unless you don’t to loose some time in future.

4. Stop debian courier-authdaemon and start custom compiled one

Now all is ready and authdaemond can be started, but before that if you have installed courier-authlib as a debian package you need to stop it via init script and only when completely sure old default Debian courier-authdaemon is stopped launch the new installed one:


# /etc/init.d/courier-authdaemon stop
# s ax |grep -i authdaemond |grep -v grep
#
# /usr/local/sbin/authdaemond start
#

To make the newly custom source installed courier-authdaemon to load itself on system boot instead of the debian installed package


# dpkg -l |grep -i courier-authdaemon
ii courier-authdaemon 0.63.0-3 Courier authentication daemon

open /etc/init.d/courier-authdaemond, after line:


. /lib/lsb/init-functions

add


/usr/local/sbin/authdaemond start
exit 0

This will make the script exit once launches cmd /usr/local/sbin/authdaemond start

5. Compile and Install courier-imap

You will also have to install from courier-imap archive source, I have tested it and know Qmail + Vpopmail + Courier-Imap works for sure with version courier-imap-4.1.2.tar.bz2

As of time of writing this post courier-imap-4.11.0.tar.bz2 is the latest available for download from Courier-imap download site unfortunately this version requires higher version of >= courier-authlib-0.63

In order install courier-imap-4.1.2.tar.bz2


# cd /usr/local/src
# wget -q https://www.pc-freak.net/files/courier-imap-4.1.2.tar.bz2
# tar -jxvvf courier-imap-4.1.2.tar.bz2
...
# chown -R hipo:hipo courier-imap-4.1.2
# su hipo
$ cd courier-imap-4.1.2/
$ export CFLAGS="-DHAVE_OPEN_SMTP_RELAY -DHAVE_VLOGAUTH"
$ export COURIERAUTHCONFIG=/usr/local/bin/courierauthconfig
$ export CPPFLAGS=-I/usr/local/courier-authlib/include
$ ./configure --prefix=/usr/local/courier-imap --disable-root-check
...
$ exit
# make
...
# make install
...
# make install configure

It is recommended courier-imap to be compiled with non root username. In above code I use my username hipo, other people have to use any non-root user.

6. Set proper configuration and new init script for courier-imap

In /usr/lib/courier-imap, download following working configs (for convenience I’ve made tar with my configs):


# cd /usr/lib/courier-imap
# rm -rf etc
# wget -q https://www.pc-freak.net/files/courier-imap-config-etc.tar.gz

Then you will have to overwrite default courier-imap init script in /etc/init.d/courier-imap with another one to start the custom compiled one instead of debian default installed courier-imap


# mv /etc/init.d/courier-imap /root
# cd /etc/init.d
# wget -q https://www.pc-freak.net/files/debian-courier-imap
# mv debian-courier-imap courier-imap
# chmod +x courier-imap

This init script is written use /var/lock/subsys/courier-imap, so you will have to also create /var/lock/subsys/


# mkdir -p /var/lock/subsys

7. Start custom installed courier-imap

The start/stop init script of newly installed courier-imap is /usr/lib/courier-imap/libexec/imapd.rc


/usr/lib/courier-imap/libexec/imapd.rc start

Since a new /etc/init.dcourier-imap is installed too, it can be also used to control courier-imap start/stop.

Well thats should be enough for Courier-authlib and Courier-Authlib to communicate fine between each other and be able to connect and fetch e-mail stored in file system by vpopmail.

8. Test if Qmail IMAP proto finally works


# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=CRAM-MD5 ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2011 Double Precision, Inc. See COPYING for distribution information.
a login username@mail-domain.com my-username-password
a OK LOGIN Ok.
a LIST "" "*"
* LIST (\HasNoChildren) "." "INBOX.Sent"
* LIST (\Marked \HasChildren) "." "INBOX"
* LIST (\HasNoChildren) "." "INBOX.Drafts"
* LIST (\HasNoChildren) "." "INBOX.Trash"
a OK LIST completed
a EXAMINE Inbox
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ()] No permanent flags permitted
* 6683 EXISTS
* 471 RECENT
* OK [UIDVALIDITY 1272460837] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
a OK [READ-ONLY] Ok
* 1 FETCH (BODY[] {2619}
Return-Path:
Delivered-To: hipo@my-domain-name.com
Received: (qmail 22304 invoked by uid 1048); 24 Apr 2012 14:49:49 -0000
Received: from unknown (HELO localhost) (127.0.0.1)
by mail.my-domain-name.com with SMTP; 24 Apr 2012 14:49:49 -0000
Delivered-To: hipo@my-domain-name.com
Received: from localhost [127.0.0.1]
......
......

That’s all it works. Enjoy 🙂

Remove icon from panel in GNOME3 (near applications Menu)

Thursday, September 27th, 2012

Remove icon from Panel in GNOME 3 Debian and Ubuntu Linux - pointing at icon near Application and Home gnome start menus

Mistakenly I added one icon near Places in (Ubuntu) ver. 12 GNOME 3 (upper) panel. To remove it following instructions given in Ubuntu Answers

Maybe the great criticism recently arisen concerning GNOME 3, new taken wrong path of development had a good standbase. Even a simple task as even for a simple operation as removing icon from the panel is now complicated….

In short to remove the icon I had to hold Win+Alt keys and then click with right (last) mouse button over the icon and choose Remove.
Cheers 😉

How to Install and configure webcam trust WB 3320X Live on Ubuntu /Debian Linux

Wednesday, September 26th, 2012

Trust Hires Webcam Live WB 3320X on Ubuntu, Debian, Xubuntu Install how to

I had to install WebCAM TRUST WB 3320X on one Xubuntu Linux install. Unfortunately by default the camera did not get detected (the Webcam vendor did not provide driver or specifications for Linux either).
Thus I researched on the internet if and how this camera can be made work on Ubuntu Linux. I found some threads discussing the same issues as mine in Ubuntu Forums here . The threads even suggested a possible fix, which when followed literally did not work on this particular 32-bit Xubuntu 12.04.1 installation.

I did 20 minutes research more but couldn’t find much on how to make the Webcam working. I used Cheese and Skype to test if the webcamera can capture video, but in both of them all I see was just black screen.

he camera was detected in lsusb displayed info as:


# lsusb | grep -i webcam

Bus 002 Device 002: ID 093a:2621 Pixart Imaging, Inc. PAC731x Trust Webcam

After reading further a bit I found out some people online suggesting loading the gspca kernel module. I searched what kind of gspca*.kokernel modules are available using:


locate gspca |grep -i .ko

1. Load proper camera kernel modules

I found a dozen of modules and after some testing with few of the found ones I realized the Camera works, whether gspca_pac730.ko and gspca_pac7311 are loaded, to test the camera I loaded both with:


# /sbin/modprobe gspca_pac730
# /sbin/modprobe gspca_pac7311

Seeing while this two modules are loaded the camera is fine capturing video. I added the above two to auto load on each Ubuntu boot:


# echo "gspca_pac730" >> /etc/modules
# echo "gspca_pac7311" >> /etc/modules

Before really I can see the camera properly capturing video, though I had to adjust few settings in default GNOME settings for Video device in gstreamer-properties

2. Change settings for video camera in gstreamer-properties


$ gstreamer-properties

The settings in the Video tab should be as you see in screenshot:

3. Testing if video camera works with VLC

There are numerous ways to test if camera is properly capturing video, vlc, mplayer, cheese or even Skype can be used. First time I tested it I used VLC, like so:


vlc v4l2:///dev/video0

Above as VLC argument I use /dev/video0 as video capturing device cause video camera is found under /dev/video0. This might vary on other Linux distros; to check the exact assigned dev, ls it:


# ls -al /dev/vide*

crw-rw----+ 1 root video 81, 0 sep 25 20:53 /dev/video0

Testing the Trust WB 3320X Live on Linux can be done with Cheese or Skype too by running them vide a LD_PRELOAD predefined bash variable;


$ LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so cheese

or for Skype


LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype

Still using vlc to test webcam is preferrable, as there is no need to invoke it via a predefined LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so bash var.

Anyways below is a screenshot of the WebCam capturing video in Skype (on the Screenshot Sali a very good person who help me a lot here in Netherlands).

Though the camera driver works, the quality is quite bad the capture image is distorted and whenever there is a movement in front of the camera the picture is really bad … Expect quality of the captured video to be maybe about 2 times? worser than those in Windows OS.

Lest the bad quality the picture is good enough to distinguish you and recognize you on the other side, so for people who are not image quality freaks quality will be okay.

4. Making the Trust WB 3320 work in skype

As prior said you need to each time invoke Skype binary with a LD_PRELOAD pre-defined variable:


$ LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype

Same goes for Cheese too:


$ LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so cheese

Typing all this long line and even remembering it is a taugh task, so I created two little wrappers scripts for both Cheese and Skype in /usr/local/bin/skype-camera-fix and /usr/local/bin/cheese-camera-fix.


$ su root
Password:
# echo '#!/bin/bash' >> /usr/local/bin/skype-camera-fix
# echo 'LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype' >> /usr/local/bin/skype-camera-fix
# chmod +x /usr/local/bin/skype-camera-fix

and


# echo '#!/bin/bash' >> /usr/local/bin/cheese-camera-fix
# echo 'LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so cheese' >> /usr/local/bin/cheese-camera-fix
# chmod +x /usr/local/bin/cheeese-camera-fix

Now as this two wrappers, are existing it is good idea to modify in GNOME menus Skype and Cheese to launch the modified bash wrapper scripts instead of the original binaries:

4. Changing default Skype and Cheese path in GNOME to skype-camera-fix and cheese-camera-fix wrapper scripts

Edit /usr/share/applications/skype.desktop and change inside, where the line says:


Exec=skype

to


Exec=/usr/local/bin/skype-camera-fix

After the change the content of skype.desktop should be as:


[Desktop Entry]
Name=Skype
Comment=Skype Internet Telephony
Exec=/usr/local/bin/skype-cam-fix
Icon=skype.png
Terminal=0
Type=Application
Encoding=UTF-8
Categories=Network;Application;

Then same goes for Cheese, change the Exec= line in file /usr/share/applications/cheese.desktop to equal to:


Exec=/usr/local/bin/cheese-camera-fix

Now after restarting the PC or logging off and then logging in again to GNOME both applications should be executing via the wrapper script.

5. Changing Brightness and tuning various other Webcam settings

As I red online, there are plenty of apps that can be used to tune up webcam color gamma, saturation, explosure etc.

I however tried only two ;

  • v4l2ucp
  • guvcview
  • I red online there is also another (camera settings feature rich) program – gtk-v4l, though never tried this one.

    From my little testing I concluded v4lucp seems to be more options rich, so I suggest using it as a primary tool for tuning webcam:

    Besides that v4l2ucp is present inside standard Ubuntu / Debian repositories, so there is no need to add any extra repositories to install it.
    Install v4l2ucp via:


    # apt-get install v4l2ucp
    # apt-get install v4l2loopback-dkms

    v4l2ucp has multiple of settings you can play with, so after installing it run it to see if you can make the camera video display a bit better. In my case it was beneficial to raise up a bit the camera brightness and correct the red as the captured video was reddish and darky


    $ v4l2ucp

    v4l2ucp change linux webcam video4linux settings

    Secondly I give a try gucview. Unfortunately it is not part of official Ubuntu repositories, so I had to add external repository:


    # add-apt-repository ppa:pj-assis/ppa
    # apt-get update
    # apt-get install guvcview

    GUVCView Chainging brightness / saturation on Trust 3220X webcam

    Well thats all though the picture is a bit distorted, Camera works. Distorted is better than none at all. Cheers 😉

Disable Apache access.log and error.log logging on Debian Linux and FreeBSD

Tuesday, September 25th, 2012

Disable Apache logging Debian and FreeBSD Linux logo

Many times disabling logging on a busy websites is quite beneficial, especially if more than few Gigabytes are written in Apache visitors log (access.log) every day. Too much visitors to Apache webserver could pose significantly increase disk writes and be negative for overall server performance.

Disabling the log is handy also for websites which already integrate a different type of visitors logging lets say – via MySQL, PostgreSQL (SQL) …

From security perspective disabling logging is a very stupid idea thought, however on systems which are experiencing high load and you need to sacrifice logging to reduce a bit the load (especially if you cannot afford to get a new server hardware), disabling it is an option.

1. Disabling access.log and error on Debian Linux

a) Disabling access.log logging
As most Debian users already know on Debian GNU Linux Apache logs all incoming (port 80) Apache requests to /var/log/apache2/access.log and /var/log/apache2/error.log

Disabling logging is very simple, just comment out line in /etc/apache2/sites-enabled/000-default:


CustomLog ${APACHE_LOG_DIR}/access.log combined

to


#CustomLog ${APACHE_LOG_DIR}/access.log combined

Then restart the webserver to re-read new config value:


# /etc/init.d/apache2 restart
....

Of course this is one of the ways to disable access.log logging. Other ways are to make logging gets logged in good old /dev/null. To use /dev/null forwardingp put Customlog /dev/null in /etc/apache2/sites-enabled/000-default


CustomLog /dev/null

In Debian Lenny and older Debian releases Customlog Apache directive is found in /etc/apache2/apache2.conf.

b) Disabling error.log logging

Same procedure applies for disabling error.log, comment out default ErrorLog directive, restart Apache and you’re done:


ErrorLog ${APACHE_LOG_DIR}/error.log

should become:


ErrorLog /dev/null

Usually just comming ErrorLog ${APACHE_LOG_DIR}/error.log is supposed to work, unfortunately for reason on Debian Squeeze this worked not commenting it and restarting Apache failed to restart apache with error:


# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting (2)No such file or directory: apache2: could not open error log file /etc/apache2/logs/error_log.
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!

Thus to disalbe error.log you need to add ErrorLog /dev/null in /etc/apache2/apache2.conf and once again restart Apache.


ErrorLog /dev/null


# /etc/init.d/apache2 restart

Bear in mind that if you use some custom virtualhosts which has the ErrorLog directive in (let’s say /etc/apache2/sites-enabled/{website-domain.com,website-domain1.com} etc. you need to change there too.
2. Disabling access.log and error.log logging on FreeBSD
On FreeBSD to disable access.log add CustomLog /dev/null to /usr/local/etc/httpd.conf and just like on Linux restart Apache:


freebsd# /usr/local/etc/rc.d/apache2 restart
....

Disaling error.log on BSD is done by changing:


ErrorLog /var/log/httpd-error.log

to


ErrorLog /dev/null

BTW disaling error.log is quite a stupid idea but in some situation, where you don’t update software versions and don’t change often webserver script interpreter and (processed) server side executables / PHP scripts it could be ok.
Still it is much better to change the amount of Apache logged information and keep error.log logging by changing:


LogLevel crit

Using LogLevel crit, will prevent Apache from logging numerous not so useless warnings in error.log, so if you have a very busy server with high loads you better use it.

Don’t expect that disabling logging will drastically improve performance usually even on Apache servers which serve more than 20 000 of requests daily disabling access.log / error.log could would probably reduce load with from 00.1 to maximum 2-3 percentage.

How to install Windows XP drivers on PC with motherboard 2006-nf-mcp61 (MCP61)

Monday, September 24th, 2012

Just few days from now I had to re-install a PC with Windows XP (the old Windows was 5 years old or so and due to Viruses and Spyware it was completely un-bootable).

I grabbed Windows XP professional SP 3 and install it. The PC is rather old 6 – 7 years (at least) 32-bit assembled one. As most assembled PCs of its time it is bundled with some strange “obscure” hardware.
Windows XP auto detect procedures failed to find proper drivers for Video Adapter, SoundCard and Lan CARD.

I checked on the back of the PC and saw the LAN card is an integrated one – this made things even worser as I even can’t use it to browse the internet so used another PC to check for drivers.

In Windows System -> Device Manager -> Hardware (Video, Sound and Lan) card was detected as unknown so I download and use Everst Home Edition 2.20 – A mirror of Everest Home Edition 2.20 is here

For my Surprise Everest was unable to provide me with any good meaningful data on the MotherBoard Chipset and failed to even find Lan, Video and Sound Adapters as physically existing on the PC.
I used numerous times Everest to check the exact hardware models on many Desktop and Laptop PCs; so far I never stumbled on such a case where physical equipment is not even detected …
Here is what was detected by Everest:

Above screenshot is unreadable the exact type of motherboard detected is:


MotherBoard ID: 09/19/2006-NF-MCP61-6A61K001C-00

My first guess was something might be wrong phisically with the 3 devices due to some power supply shock or whatever, but decided to try to find driver and after some pondering online I ended up with the right drivers

Sound Driver for 2006-NF-MCP61 MotherBoard Chipset (WDM_R270.exe)

The LAN Card happaned to be some kind of obscure Nvidia Driver I found the driver on NVidia’s website, just in case someone is looking for same and it disappears in future from NVidia.com, I made mirror – Network Card Driver (Lan Card) Nvidia driver for 2006-NF-MCP61 MotherBoard

I looked for quite some time but I couldn’t find the Video driver. The PC works with some kind of Windows default video driver (probably something like Linux VESA) and this is not very good so I decided checked for a similar Alternative to Everest Home Edition.In one forum thread I saw people talking about a program called SIW which is often better detecting hardware than Everest, so decided to give it a try. The program is commercial but there is a 15-days trial available on SIW website .

Thanks to SIW the Video exact model and vendor got detected – the computer is with NVIDIA Corporation / GeForce 6100 Nforce 400< br />
Below is a screenshot of SIW in action:

SIW Everest Hardware Detection Alternative program for MS Windows XP ScreenShot Nvidia GeForce 6100

I’ve also made a download mirror of the Trial version of SIW here
, if you want check it out it gives really really extensive of each computer component.

How to delete MySQL user using mysql cli command

Monday, September 24th, 2012

I decided to clean up a bit my MySQL obsolete users. I use to test free software every now and then and often in the hurry I forgot to clean up the respective soft database and created user in database/table mysql.user.

This is how this tiny article get born. Deleting users in version MySQL 5.0 and higher use command:

mysql> DROP USER username@localhost;

On older MySQL versions; 3.x / 4.x the SQL query is a bit longer:

mysql> DELETE FROM user WHERE User= 'type_your_user_name_here' AND Host= 'localhost'; mysql> FLUSH PRIVILEGES;

Well that's all, now user is wiped out, Enjoy 🙂
 

Install ShellInABox (web shell browser AJAX frontend) on Debian GNU / Linux

Sunday, September 23rd, 2012

ShellinAbox web ssh shell browser frontend for Debian, Ubuntu, Arch Linux, Redhat and other GNU / Linux distributions

ShellInABox is a tiny piece of soft which can enable you to access your server or desktop via ssh shell using the web command line shell through AJAX interface. Installing it is not a hard task. To install on any Linux just navigate to shellinabox.com and download compile and install using the source code from tar.gz.
Installing ShellinaBox on Debian or Ubuntu and derivative based Linux it is even easier as on the website there are pre-compiled deb binaries which can be straight installed with dpkg

For 32 bit Debian version, installation is as simple as;

1. Download the i386 deb binary from Shellinabox.com
Just go to the website and look up for correct link and download with links

As of time of writting this post to download with links text browser:


links "http://code.google.com/p/shellinabox/downloads/detail?name=shellinabox_2.9-1_i386.deb&can=2&q="

2. Install deb pack with dpkg


dpkg -i shellinabox_2.9-1_i386.deb

For 64 bit amd64 bit arch Debian, install a Pre-built Debian x86-64 package (requires Ubuntu Karmic). Though the binary is said to be for Ubuntu it also installs and starts the shellinabox service (daemon) without no problem. By default shellinabox is configured to work on port number 4200. Right after install to test it open your favourite browser and do request to localhost port 4200:


http://127.0.0.1:4200/

BTW, I’ve used a couple of others Java based web ssh frontends and I should say, ShellinAbox is much more responsive.
Well that’s all now enjoy connecting to remote system ssh using any AJAX supporting browser 🙂