[SOLVED] Pam_env(cron:session): Unable to open env file: /etc/default/locale: No such file or directory

Problem Description
In my server logs I constantly get these log errors relating to ‘CHRON’.
I have tried:

  • dpkg-reconfigure
  • touch /etc/environment
  • cat /etc/environment

Expected Results
Not have logs every hour with the error.

Actual results
(I get an error with the following message:)

pam_env(cron:session): Unable to open env file: /etc/default/locale: No such file or directory
pam_access(cron:account): access denied for user daemon' from cron’



/etc/default/locale should be generated by the locales package. You can check if that is installed.

Sorry for the novice response but how would I check…?

Am I able to access the freedom box files through the cockpit?
Or do I have to physically remove the sd card and search that way?


Just click “Terminal” in Cockpit, and you can run this command:

$ apt policy locales
  Installed: 2.28-10
  Candidate: 2.28-10
  Version table:
 *** 2.28-10 500
        500 http://deb.debian.org/debian buster/main armhf Packages
        100 /var/lib/dpkg/status

This is how it looks on my box.

1 Like

I see, this is what it returns:

  Installed: (none)
  Candidate: 2.28-10
  Version table:
     2.28-10 500
        500 tor+http://deb.debian.org/debian stable/main armhf Packages

You can try installing it then with sudo apt install locales.

1 Like

Thanks for that.

So it works and the folder is now created.
Lastly however I am left with the error which can be seen in the first image in the thread of:

pam_access(cron:account): access denied for userdaemon’ from cron'

How would I go about fixing this?

Thanks again.

For pam_access error, see https://discuss.freedombox.org/t/etc-cron-d-debsecan-generates-error/1008

1 Like