Wednesday, June 22, 2011

Cannot login all of the email accounts in cpanel

Cannot login all of the email account of a particular domain in cpanel server

We can see the email accounts details of a particular domain under /home//etc//

Eg: ( /home/tom/etc/tuxunited.com )

In that directory we can see all of the email accounts in passwd file. The Passwords are pointed to shadow file .

Eg: /home/tom/etc/tuxunited/passwd

 /home/tom/etc/tuxunited/shadow

In shadow file the 2nd entry is encrypted password. If there is an entry *LOCKED* with the encrypted password , that email account has been locked.

Eg: # vi /home/tuxunited/etc/tuxunited.com/shadow

===========================================================

ajeesh:*LOCKED*$1$JbPEsgb7$tyQYmQ7MaPmNyvQNyGZ1p1:14734::::::

anuraj:*LOCKED*$1$PZqJn5iW$Z7yLqlJOdfYHp8dV8OdMo/:14741::::::

ratheesh:*LOCKED*$1$DMc67Xil$uwf66mI1TNuiVA5FRp/ZI1:14746::::::

rajesh:*LOCKED*$1$Y839ThXi$oQIPjz563yOJpJxnNZkd11:14755::::::
=============================================================

The encrypted password should starts with $ . So we need to remove this  *LOCKED* entry from that file. Before doing that take a backup of that shadow file. Then remove these entry.

# vi /home/tuxunited/etc/tuxunited.com/shadow


:%s/*LOCKED*//g

This will removed all of the locked entries from that file. Save the file and retry to login into any of the email account.

2 comments:

  1. Why do this LOCK happens in cpanel? What is triggering this?

    ReplyDelete
    Replies
    1. I have seen these issues while transferring accounts from one server to another, addon domain to main domain, main domain to addon domain etc.I think this may be due to the different cpanel versions .. but not clear why this is happening ...do you have any idea .. ?

      Delete