When you get the error login failed because of invalid username and password (horde, roundcube, squirrelmail)
Here is the solution:
Check the hostname using the following command
Server needs a FQDN hostname configured and also need to be resolvable in DNS. For example if your domain name is linuxtechme.com then hostname can be server.linuxtechme.com And you should add an entry for server.linuxtechme.com in the DNS.
You can do that in WHM as follows
Main >> Networking Setup >> Change Hostname
It will also ask you add an A record entry for it.
Now run the following commands.
#rm -f /etc/userdomains
[# /usr/local/cpanel/scripts/updateuserdomains –force
Now restart the cPanel service.
The webmail login error with cPanel should be fixed now.