Linux cron entry: ORPHAN (no passwd entry)

I saw an entry in my /var/log/cron file as below:

Jul 10 08:01:01 server1 crond[3420]: (tmp.XXXXEXYFUw) ORPHAN (no passwd entry) 

What could be the possible meaning of this?

This will occur if there's a file in the /var/spool/cron directory that doesn't match up to a username and UID. So if you find /var/spool/cron/anthony --you must be able to 'id anthony'. Or you can just grep from /etc/passwd file.

One of the reason could be as a result of creating a backup file for root /var/spool/cron/anthony.back. Since there is no UID for user "anthony.back" then it's considered ORPHAN.

Make sense? Here's the code --this conditional has probably not changed for years...

if (strcmp(fname, "*system*") && !(pw = getpwnam(uname))) {
/* file doesn't have a user in passwd file.
log_it(fname, getpid(), "ORPHAN", "no passwd entry");
goto next_crontab;

No comments: