On 2023-05-14 18:58, Per Jessen wrote:
I'm having an issue with a new cronjob - the machine is running leap155. I have a userid "dns24" which originally had a homedir of "/srv/dns24". We decided not to use that after all, but didn't change and then noticed these in the log:
2023-05-14T18:41:01+02:00 dns24 systemd[1]: Started User Manager for UID 111. 2023-05-14T18:41:01+02:00 dns24 systemd[1]: Started Session c17 of User dns24. 2023-05-14T18:41:01+02:00 dns24 cron[26821]: pam_unix(crond:session): session opened for user dns24 by (uid=0) 2023-05-14T18:41:01+02:00 dns24 CRON[26831]: (dns24) CMD (make -r -C /srv/dns24.admin -f Makefile.database) 2023-05-14T18:41:01+02:00 dns24 CRON[26831]: (CRON) ERROR chdir failed (/srv/dns24): No such file or directory ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-05-14T18:41:01+02:00 dns24 CRON[26821]: (dns24) CMDEND (make -r -C /srv/dns24.admin -f Makefile.database) 2023-05-14T18:41:01+02:00 dns24 CRON[26821]: pam_unix(crond:session): session closed for user dns24 2023-05-14T18:41:01+02:00 dns24 systemd[1]: session-c17.scope: Deactivated successfully.
Ah, forgot to change the homedir. Changed the homedir using yast.
2023-05-14T18:46:01+02:00 dns24 systemd[1]: Started User Manager for UID 111. 2023-05-14T18:46:01+02:00 dns24 systemd[1]: Started Session c22 of User dns24. 2023-05-14T18:46:01+02:00 dns24 cron[30866]: pam_unix(crond:session): session opened for user dns24 by (uid=0) 2023-05-14T18:46:01+02:00 dns24 CRON[30876]: (dns24) CMD (make -r -C /srv/dns24.admin -f Makefile.database) 2023-05-14T18:46:01+02:00 dns24 CRON[30876]: (CRON) ERROR chdir failed (/srv/dns24): No such file or directory 2023-05-14T18:46:01+02:00 dns24 CRON[30866]: (dns24) CMDEND (make -r -C /srv/dns24.admin -f Makefile.database) 2023-05-14T18:46:01+02:00 dns24 CRON[30866]: pam_unix(crond:session): session closed for user dns24 2023-05-14T18:46:01+02:00 dns24 systemd[1]: session-c22.scope: Deactivated successfully. 2023-05-14T18:46:12+02:00 dns24 systemd[1]: Stopping User Manager for UID 111...
nscd picked up the change:
2023-05-14T18:45:17+02:00 dns24 nscd[605]: 605 monitored file `/etc/passwd` was written to 2023-05-14T18:45:17+02:00 dns24 nscd[605]: 605 monitored file `/etc/passwd` was moved into place, adding watch
yes, /etc/passwd has the new homedir and the new homedir exists. I'm sure I can reboot and all will be well, but ....
systemctl restart cron.service, perhaps? If not, it would be the "user manager", dunno what exactly is that. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)