#917623 anacron: command logname fails in a cron.daily job run by anacron

Package:
anacron
Source:
anacron
Description:
cron-like program that doesn't go by time
Submitter:
"Francesco Poli (wintermute)"
Date:
2018-12-29 12:45:03 UTC
Severity:
normal
#917623#5
Date:
2018-12-29 12:40:17 UTC
From:
To:
Hello,
I noticed that anacron sets an environment (for running cron.daily jobs,
but probably even weekly and monthly jobs...) where the "logname" command
fails.

I mean: if a cron.daily job invokes the "logname" command, then this
command fails, thus producing the following error message on stderr:

  logname: no login name

The error message (if not caught) is sent via local mail along with
the rest of the cron.daily job output.


It seems that this happens only when anacron is in charge of running
cron.{daily|weekly|monthly} jobs. Without anacron installed, cron
takes care of those jobs, and the "logname" command does not fail.

I think anacron should set an environment where the "logname" command
succeeds.


Thanks for your time!
Bye.