The title of this post is a very shortened version of the key words and the frustration that consumed hours of my day.
CPanel Cannot Change Passwords after Migration should be expanded to read, “After migrating from one CPanel server to another, a users email account could not have the Password reset.”
Even then, the process of Resetting the password, from the admin WHM side, and accessing the users Cpanel Account to Email admin section, and using Manage for the user and hitting up the Change password option, completed all ok. It ‘looked’ like it was changing the password.
But, trying to Check Email from that screen prompted for the users email address and password and repeatedly stated that it was an Invalid Login.
I then tried many times with multiple email accounts for that user. Then I tried another account and it was ok.
So what was happening with this specific account ?
After messing around a bit, I then tried to change the accounts CPanel password, just to confirm that I could login to CPanel for the user, but the following message appeared:
The password for 'usersaccountname' could not be changed because: Sorry, the user “usersaccountname” is currently suspended. Changing the user’s password would unsuspend the account.
Huh???
Checked the List Accounts panel and the account was not shown as suspended, i.e. no pink highlight.
So I issued this command to unsuspend the CPanel account:
# /usr/local/cpanel/scripts/unsuspendacct usersaccountname --retain-service-proxies
But got an error:
An error occurred while attempting to unsuspend “usersaccountname”. The user “usersaccountname” is not in a suspended state.
Another “Huh??” so I tried to Suspend the account to see what was reported:
# /usr/local/cpanel/scripts/suspendacct usersaccountname
User 'usersaccountname' is already suspended. Provide '--force' argument if you wish to do this.
So the account is suspended but not completely. The next step was to –force the suspension as suggested.
# /usr/local/cpanel/scripts/suspendacct usersaccountname --force
Changing Shell to /bin/false...Done
Locking Password...Done
<...snip...>
usersaccountname's account has been suspended
The above ‘forced’ the partly suspended account to be suspended and then I requested unsuspend and it worked. Following that process:
# /usr/local/cpanel/scripts/unsuspendacct usersaccountname --retain-service-proxies
Unsuspending outgoing email....Done
<...snip...>
Unsuspending websites...
Unsuspending FTP accounts...
usersaccountname's account is now active
Unsuspending mysql users
Keep service proxying settings for this account...Done
usersaccountname's account has been unsuspended
Subsequently accessing the users email via webmail worked. The changed email passwords had actually been saved, but the mixed up ‘suspended’ state was preventing the access from taking place.
This could be summarised as “For CPanel rejecting Webmail Passwords, check for suspended state via command line” and hopefully you can avoid hours of pain.