A great linux stuff website

Monthly Archives: February 2013

Actual issue:
AWSTAT has stopped working on website to update automatically for particular user, below steps will allow to fix the issue.

Login to WHM, then select Server Configuration ->> Tweak Settings. Scroll down for Stats and Logs.
Check the box “Allow users to update Awstats from cPanel”

Also check the setting is actually enabled, by checking the AWStats Configuration File for a particular user.

1. Login to server SSH as root
2. cd /home/username/tmp/awstats
3. grep AllowToUpdateStatsFromBrowser awstats.mydomain.com.conf
4. It should be set to AllowToUpdateStatsFromBrowser=1
5. Make above changes to correct from 0 to 1
6. restart cpanel : /etc/init.d/cpanel restart

AWstats can be update Manually through Shell using following command: :-

# /scripts/runweblogs cpaneluser

Visual editor text not visible – displays html when highlighted.

There are no editing icon available in the visual mode, so I cannot edit both pages & posts in visual mode. I can edit post & pages using the HTML code. The HTML code is also appearing in the visual edit mode. So in order to resolve the issue need to disable the plugins and themes one by one and check. If the issue is still there then open wp-config.php file and add below:

define(‘CONCATENATE_SCRIPTS’, false );

This Should be resolve your issue. 🙂

Login to server using SSH.

Follow the below steps ::

1. To clean the old archives check the below directory
# cd /usr/local/cpanel/3rdparty/mailman/archives/private/
# cd listname_clientdomain.ext

NOTE: replace listname_clientdomain.ext for your corresponding mailing list name and domain name.

Then delete the files related to your list executing (as an example):
rm -fR 2012*
In the example above we deleted all the archived files for year 2012.

2. To clean the attachments (keeping just the last 3 months):
# cd attachments
tmpwatch –mtime –all 744 /usr/local/cpanel/3rdparty/mailman/archives/private/listname_clientdomain.ext/attachments

NOTE: replace listname_clientdomain.ext for your corresponding mailing list name and domain name.

3. To clean the cache for mailman once done.
# /scripts/update_mailman_cache

So, It will show the right quota at the account disk space used.

Plesk server uses qmail as a mail server. Following are some of the qmail commands for Plesk server.

1) To check the mail queue in plesk from command line, you can use the command :

# /var/qmail/bin/qmail-qstat
messages in queue: 10

messages in queue but not yet preprocessed: 0

2) You can examine the queue with qmail-qread.

# /var/qmail/bin/qmail-qread

3) From the qread command you get the message’s id . In the above example , one of the id is 524514 . Now you can find the file holding the email in/var/qmail/queue with “find “command.

# find /var/qmail/queue -iname 524514



4) From the mail header you get the IP address

vi /var/qmail/queue/mess/22/524514

5) If you wish to remove the emails with some patterns , you can use qmail-remove ( You can download it from here )

# /etc/init.d/qmail stop (Stop qmail before removing)
# /var/qmail/bin/qmail-remove -r -p “Time Passing”

(considering that “Time Passing” was the subject of the email )

The above steps can be used to track Spammers .

Do you wish to completely remove all the mails from queue? Just run the below commands.

find /var/qmail/queue/mess -type f -exec rm {} \;
find /var/qmail/queue/info -type f -exec rm {} \;

find /var/qmail/queue/local -type f -exec rm {} \;

find /var/qmail/queue/intd -type f -exec rm {} \;

find /var/qmail/queue/todo -type f -exec rm {} \;

find /var/qmail/queue/remote -type f -exec rm {} \;

If you have lost your admin details of your WordPress blog then you can easily reset your blog admin password using Below step “http://domain.com/wp-login.php or http://domain.com/administrator”.

1. It can be done through database directly.
The most convenient way to manage the database is via the phpMyAdmin tool.
2. Login to your cPanel (for cPanel user and password check welcome email )Goto your cPanel -> MySQL Databases section and Scroll down the page till you notice the small phpMyAdmin link.
3. Click on site “website” WordPress database >> (In structure) >> click on abc_user(it should be proper name) >> select user admin >> click edit. You will see the admin user and encrypted old password.
4 You can make password as per your request and crypt that same password with md5, copy that password and past that in your “user_pass” in database >> click go, after finish try to login your website admin “http://domain.com/wp-login.php or http://domain.com/administrator”” done.

5. For md5 crypt you can use MD5 password generator URL: http://md5generator.net/