Sometime you may face issue while logging to WHM where password does not work but via SSH password work The issue in cpanel server is due to cphulkd which is one of the security feature.
to get it password working you need to ssh and disabled cphulkd using below commands
root@server [~]# /usr/local/cpanel/etc/init/stopcphulkd
Waiting for cphulkd.pl,cPhulkd,cphulkd to shutdown ….. terminated.
root@server [~]# /usr/local/cpanel/bin/cphulk_pam_ctl –disable
Now you can login to server via WHM