Recently I faced an issue, a reseller is unable to switch accounts from his main cpanel account. He can switch to some accounts without any issue. However getting Login attempt failed screen  when trying with some accounts. I have checked the ownership and all but all seems fine. Googling doesn;t help much.Atlast I found what the issue is.

Check if the user is present in

/var/cpanel/suspended

if the user is listed there move it to somewhere else.

vi  /var/cpanel/users/username

check for the entry suspend=1 if its there comment or delete it.

Goto the reseller cpanel and try to switch account, it will work. Also try the same if you have encountered an issue with account suspension.

 

If you forget the wordpress login password we can reset it in many ways. My favourite way is to change it from mysql command line. Follow the below steps to change it.

1. mysql -u root -p (login to mysql)
2. mysql> show databases;
3. use wp-database; (your wordpress database)
4. mysql> show tables;

You can see a table wp_users which contains all the user details. Use the below command to see the details of it.

5.  mysql> describe wp_users;
6. mysql> SELECT ID, user_login, user_pass FROM wp_users;

It will display all the details of the users.

+—-+————+————————————+
| ID | user_login | user_pass                          |
+—-+————+————————————+
|  1 | admin      | $P$BJvA.ZCJYfueDfJ1BRjcae6.3QHglB/ |
+—-+————+————————————+

7.mysql> UPDATE (wp_users) SET user_pass="specify the new pasword in MD5 format" WHERE ID = (specify the id of the user which we need to change the password);

use any MD5 creator site to make the password in md5 format. For example,

mysql> UPDATE (wp_users) SET user_pass=”21232f297a57a5a743894a0e4a801fc3″ WHERE ID = (1);

 

If you have the recent version of mysql, it can create the md5 password itself.

“UPDATE (wp_users) SET user_pass = MD5(‘”(new-password)”‘) WHERE ID = (1)”

Thats it. You have successfully changed the password.

 

Exim is a very common MTA ( Mail Transfer Agent) used worldwide. There are so many inbuilt exim commands which are helpful for the admins to take care of the mail issues. Below I am pasting some useful commands which I have been using.

Number of mails in the queue

# exim -bpc
 Details of the messages in the queue (time queued, size, message-id, sender, recipient)
# exim -bp
Summary of messages in the queue (count, volume, oldest, newest, domain, and totals)
# exim -bp | exiqsumm
See what exim is doing currently
# exiwhat
Exim's configuration settings
# exim -bP
Exiqgrep
Search the queue for messages from a specific sender
# exiqgrep -f user@domain
Search the queue for messages for a specific recipient/domain
# exiqgrep -r user@domain

List the message older than specified number of seconds

# exiqgrep -o 3600
List the messages that are younger than the specified number of seconds
# exiqgrep -y 3600
Queue management
Start a queue run
# exim -q -v
Start a queue run for just local deliveries
# exim -ql -v
Remove a message from the queue
# exim -Mrm <message-id>
Freeze a message
# exim -Mf <message-id>
Thaw a message
# exim -Mt <message-id>
Deliver a message, whether it's frozen or not, whether the retry time has been reached or not
# exim -M <message-id>
Deliver a message, but only if the retry time has been reached
# exim -Mc <message-id>
Remove all frozen messages
# exiqgrep -z -i | xargs exim -Mrm
Remove all messages older than specified seconds(eg:5days)
# exiqgrep -o 432000 -i | xargs exim -Mrm
Freeze all queued mail from a given sender
# exiqgrep -i -f user@example.com | xargs exim -Mf
View a message's headers
# exim -Mvh message-id
View a message's body
# exim -Mvb <message-id>
View a message's logs
# exim -Mvl <message-id>
Add a recipient to a message
# exim -Mar <message-id> mail@domain
Edit the sender of a message
#exim -Mes <message-id> mail@domain