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

**URL:** <https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088>\
**Category:** Support\
**Created:** [September 12, 2020, 12:58am UTC](https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088 "2020-09-12T00:58:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![axell](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@axell](https://discuss.freedombox.org/u/axell)\
**Post date:** [September 12, 2020, 12:58am UTC](https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088/1 "2020-09-12T00:58:38Z")

</div>

**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’

**Screenshot**

 ![chron](https://discuss.freedombox.org/uploads/default/original/1X/240b55a948ffec58f3fcb92ca19d9a59714e11c4.png)

Thanks.

---

<div class="post-metadata">

**Author:** ![jvalleroy](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/jvalleroy/32/331_2.png) [@jvalleroy](https://discuss.freedombox.org/u/jvalleroy)\
**Post date:** [September 12, 2020, 11:40am UTC](https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088/2 "2020-09-12T11:40:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![axell](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@axell](https://discuss.freedombox.org/u/axell)\
**Post date:** [September 12, 2020, 11:55pm UTC](https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088/3 "2020-09-12T23:55:07Z")

</div>

> [@jvalleroy](#):
>
> the locales package. You can check if

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?

Thanks.

---

<div class="post-metadata">

**Author:** ![jvalleroy](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/jvalleroy/32/331_2.png) [@jvalleroy](https://discuss.freedombox.org/u/jvalleroy)\
**Post date:** [September 13, 2020, 11:27am UTC](https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088/4 "2020-09-13T11:27:11Z")

</div>

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

```auto
$ apt policy locales
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.

---

<div class="post-metadata">

**Author:** ![axell](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@axell](https://discuss.freedombox.org/u/axell)\
**Post date:** [September 14, 2020, 3:40am UTC](https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088/5 "2020-09-14T03:40:39Z")

</div>

I see, this is what it returns:

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

---

<div class="post-metadata">

**Author:** ![jvalleroy](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/jvalleroy/32/331_2.png) [@jvalleroy](https://discuss.freedombox.org/u/jvalleroy)\
**Post date:** [September 14, 2020, 12:22pm UTC](https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088/6 "2020-09-14T12:22:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![axell](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@axell](https://discuss.freedombox.org/u/axell)\
**Post date:** [September 15, 2020, 6:56am UTC](https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088/7 "2020-09-15T06:56:20Z")

</div>

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 user`daemon’ from `cron'`

How would I go about fixing this?

Thanks again.

---

<div class="post-metadata">

**Author:** ![lifeform](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@lifeform](https://discuss.freedombox.org/u/lifeform)\
**Post date:** [September 15, 2020, 1:16pm UTC](https://discuss.freedombox.org/t/solved-pam-env-cron-session-unable-to-open-env-file-etc-default-locale-no-such-file-or-directory/1088/8 "2020-09-15T13:16:21Z")

</div>

For pam\_access error, see [https://discuss.freedombox.org/t/etc-cron-d-debsecan-generates-error/1008](https://discuss.freedombox.org/t/etc-cron-d-debsecan-generates-error/1008)
