How to fix Missing Date and Time in Menu Bar in Ubuntu 14.04 LTS

All of a sudden, the “Menu Bar” (equivalent to what we call Taskbar in Windows) on my Ubuntu has stopped showing me date & time for some unknown reasons. My first instinct were to check the System Settings -> Time and Date

Continue reading

How to change download mirror in Ubuntu

As soon as you begin installing Ubuntu or being downloading packages, the number one question is, Why is this download taking so long?

The answer is simple, probably your mirror is not correctly set and its taking longer to download files. How to fix? simply follow these instructions

Continue reading

Play all media formats on Ubuntu 14.04 LTS Desktop

I still remember the first time I test-drove Mandriva Linux (formerly known as Mandrake), I could run every other audio and video format out-of-the-box without downloading anything (it was a dialup modem era so downloading was a pain-in-the-rear).

Many years after, I finally installed Ubuntu 14.04 LTS on my new laptop but it does not recognize some of my mp3 files and im like “Are you kidding me?”

Im glad I found a solution, there is a package called ubuntu-restricted-extras (read the Wikipedia entry and Ubuntu documentation) that you can install and it support all major media formats, Codecs and even Flash Player. To install, you need to run

sudo apt-get install ubuntu-restricted-extras

Legal Notice Patent and copyright laws operate differently depending on which country you are in. Please obtain legal advice if you are unsure whether a particular patent or restriction applies to a media format you wish to use in your country.

Windows to Linux (Ubuntu 14.04 LTS) Migration

I have been a hardcore Linux user from a Server-OS point of view since many years. Have used CentOS, Ubuntu, Debian and Fedora extensively. I have always recommended and used Linux without hesitation since I knew this is one thing that I cannot be wrong about.

One place where I was reluctant to use Linux iswas my Desktop. My PC, Laptop and Work-Laptop running Windows 7. Although I love the simple interface of Windows, now its time that I try to experiment with a Linux Desktop OS. I am sure that within a few weeks, if not days, I would get in love with my decision which I have been postponing since many years now.

I have chosen Ubuntu 14.04 LTS for this purpose. What follows is my transition from Windows to Linux as my primary-Desktop-OS. I will be documenting my journey extensively in the coming few weeks.

Stay tuned!

How to find zombie processes on linux

My NAGIOS monitor alerted me that of my dedicated server has 10 Zombie processes, how to find Zombie processes via command line on Linux especially CentOS?

 ps aux | awk '{ print $8 " " $2 }' | grep -w Z 

So it returns state (Z = Zombie) and the process id (PID)

root@sirius [~]#  ps aux | awk '{ print $8 " " $2 }' | grep -w Z
Z 4399
Z 4435
Z 4868
Z 5143
Z 5400
Z 5834
Z 7584
Z 11943
Z 16286
Z 24365

Technically, you cannot kill a zombie process since its already dead but the entry in the process table is not removed because the parent will access the result via the PID in the process table.

Webalizer not working on Ubuntu

One of my Ubuntu based VPS had Webalizer installed to collect stats from webserver but it was not working because I could see not stats at /webalizer/. If thats the case with you try the following

1) Try running the webalizer crontab

root@backups:~# /etc/cron.daily/webalizer
Error Opening file /usr/share/GeoIP/GeoIP.dat

So we have identified the culprit that geoip-database is not installed.

2) Fix this by installing geoip-database

root@backups:~# apt-get install geoip-database

Continue reading

How to find specific files and send alerts

Maintaining a shared hosting server is a full time job but tools and proper checks and balances can help make this burden lot less. I manage a shared hosting server for one of my friends and numerous times the scripts that people have installed over on their websites have vulnerabilities and hackers exploit it to upload stuff that mass-email or do other nasty stuff. Luckily, most of these exploits have common patterns like files names or other signatures that make them traceable (most of the time the so called hackers are just kiddy scripts)

Create a file and put this in it

#!/bin/bash
find /home -name 'paypal.com*' | mail -s '[Woodcrest] Phishing Alert!' me@mydomain.com
find /home -name 'rout.php' | mail -s '[Woodcrest] Phishing Alert - Mail Bomber!' me@mydomain.com

This is a small script that finds specific named scripts in the /home directory (mostly cPanel servers). You can put this in the crontab to do a scan every x hours or so.

Have any questions or comments? feel free to post them below!

package-cleanup: command not found

I tried to do package-cleanup and found this

root@ns1 [~]# package-cleanup --problems
-bash: package-cleanup: command not found

If I was on Ubuntu, I would have done “apt-get install package-cleanup” but it does not work that way on CentOS, its actually available in yum-utils package, install it by typing

yum install yum-utils

Enjoy!!