Univention Bugzilla – Bug 56455
cron error mail every day by univention-pam/ldap-group-to-file when unjoined
Last modified: 2023-08-18 12:51:15 CEST
+++ This bug was initially created as a clone of Bug #56454 +++ +++ This bug was initially created as a clone of Bug #56378 +++ /etc/cron.d/univention-pam runs [ -x /usr/lib/univention-pam/ldap-group-to-file.py ] && /usr/sbin/jitter 1800 /usr/lib/univention-pam/ldap-group-to-file.py every day by default, which fails is the system is not joined yet: Traceback (most recent call last): File "/usr/lib/univention-pam/ldap-group-to-file.py", line 151, in <module> main() File "/usr/lib/univention-pam/ldap-group-to-file.py", line 102, in main lo = univention.uldap.getMachineConnection(ldap_master=False, random_server=True) File "/usr/lib/python3/dist-packages/univention/uldap.py", line 172, in getMachineConnection bindpw = open(secret_file).read().rstrip('\n') FileNotFoundError: [Errno 2] No such file or directory: '/etc/machine.secret' root@korpon:/etc/cron.d# grep -c /usr/lib/univention-pam/ldap-group-to-file.py /var/mail/systemmail 54 The script should not run (or exit cleanly) if the system is not joined yet, e.g. [ -f /var/univention-join/joined ] || exit 0