Created attachment 352396 [details, diff] Run logcheck using sudo instead of su. Running logcheck using su causes winbind to report an error: pam_winbind(su:account): valid_user: wbcGetpwnam gave WBC_ERR_DOMAIN_NOT_FOUND Attached is a diff against /etc/cron.hourly/logcheck.cron for running logcheck using sudo instead of su.
You cannot simply replace su with sudo, so that isn't the solution to your problem, which is apparently caused by /lib/security/pam_winbind.so. Do you really need USE=pam in net-fs/samba to begin with?
(In reply to Jeroen Roovers from comment #1) > You cannot simply replace su with sudo, so that isn't the solution to your > problem, which is apparently caused by /lib/security/pam_winbind.so. Do you > really need USE=pam in net-fs/samba to begin with? This looks like an unusual configuration issue. If you think this should be better supported out-of-the box, please re-open and post your PAM configuration or precise steps to reproduce. The cron job should not assume the presence of sudo configured in a way that makes it possible to run that command.