@Jerry: thanks for the tip, I had this issue after migrating some sites from Ensim X to cPanel.
I did a small/fancy/dirty php script that will do what Jerry said, copy/paste the code and execute it, it will walk through all your domains and check if those files have the right ownership and permissions. If you see some site is not ok you can do it manually or set the $debug variable in the script to false and let it fix it for you 
PHP Code:
#!/usr/bin/php -q
<?
// file: fix_auth_perms.php
// turn it off if you want to fix them
// based on http://forums.cpanel.net/showpost.php?p=323248&postcount=3
// more details http://xux.in/blog/post/cpanel-535-incorrect-authentication-data/
$debug = true;
$maps = file("/etc/domainusers");
if (!is_array($maps)) die("No users found!\n");
foreach ($maps as $map) {
list($user,$domain) = explode(": ",trim($map));
if (!$user || !$domain) continue;
echo "\nChecking $domain ...\n";
_file_fix("/home/$user/etc",$user,"mail");
_file_fix("/home/$user/etc/$domain",$user,"mail");
_file_fix("/home/$user/etc/$domain/shadow","","mail","0640");
//exit;
}
// $file = full dir/file path
// $nuser = desired user name
// $ngroup = desired group name
// $perms = desired permissions in octal mode (0640)
function _file_fix($file="",$nuser="",$ngroup="",$perms="") {
global $debug;
$uname_array = posix_getpwuid(fileowner($file));
$gname_array = posix_getgrgid(filegroup($file));
$file_perms = substr(sprintf('%o', fileperms($file)), -4);
echo " $file owned by $uname_array[name].$gname_array[name] ($file_perms)\n";
//wrong ownership, fixing it now!
if (!$debug) {
if ($nuser && $nuser != $uname_array[name]) {
if (!chown($file, $uname_array[name])) echo " couldn't change file owner to $nuser\n";
else echo " changed file owner to $nuser\n";
}
if ($ngroup && $ngroup != $gname_array[name]) {
if (!chgrp($file, $gname_array[name])) echo " couldn't change group owner to $ngroup\n";
else echo " changed group owner to $ngroup\n";
}
}
if ($perms && $perms != $file_perms) {
if (!$debug) {
if (!chmod($file,octdec($perms))) echo " couldn't change file mode to $perms\n";
else echo " changed file mode to $perms\n";
}
}
//making a nice output :P
if (!$nuser) $nuser = $uname_array[name];
if (!$ngroup) $ngroup = $gname_array[name];
if (!$perms) $perms = $file_perms;
echo " $file should now be owned by $nuser.$ngroup ($perms)\n";
}
?>