Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Since update to 11.04, I keep receiving messages from 'Anacron', with some errors. Two types of messages, actually.


The first of those types is like:

/etc/cron.daily/logrotate:
/etc/denyhosts.conf: 28: SECURE_LOG: not found
/etc/denyhosts.conf: 36: HOSTS_DENY: not found
/etc/denyhosts.conf: 60: PURGE_DENY: not found
/etc/denyhosts.conf: 95: BLOCK_SERVICE: not found
/etc/denyhosts.conf: 110: DENY_THRESHOLD_INVALID: not found
/etc/denyhosts.conf: 121: DENY_THRESHOLD_VALID: not found
/etc/denyhosts.conf: 131: DENY_THRESHOLD_ROOT: not found
/etc/denyhosts.conf: 142: DENY_THRESHOLD_RESTRICTED: not found
/etc/denyhosts.conf: 155: WORK_DIR: not found
/etc/denyhosts.conf: 200: LOCK_FILE: not found
/etc/denyhosts.conf: 221: ADMIN_EMAIL: not found
/etc/denyhosts.conf: 232: SMTP_HOST: not found
/etc/denyhosts.conf: 233: SMTP_PORT: not found
/etc/denyhosts.conf: 252: Syntax error: newline unexpected
error: error running non-shared postrotate script for /var/log/denyhosts of '/var/log/denyhosts '
run-parts: /etc/cron.daily/logrotate exited with return code 1

These are the corresponding entries in /etc/denyhosts.conf

SECURE_LOG = /var/log/auth.log
HOSTS_DENY = /etc/hosts.deny
PURGE_DENY = 1w
BLOCK_SERVICE  = sshd
DENY_THRESHOLD_INVALID = 5
DENY_THRESHOLD_VALID = 10
DENY_THRESHOLD_ROOT = 1
DENY_THRESHOLD_RESTRICTED = 1
WORK_DIR = /var/lib/denyhosts
LOCK_FILE = /var/run/denyhosts.pid
ADMIN_EMAIL = root@localhost
SMTP_HOST = localhost
SMTP_PORT = 25

All of them seem fine to me.

Also, lines 251-253 in the same file go like:

#
SMTP_FROM = DenyHosts <DenyHosts@localhost>
#

So I don't see the "unexpected newline", either...


The other type of mail message I get from 'Anacron' is:

/etc/cron.daily/popularity-contest:
readline() on closed filehandle FILES at /usr/sbin/popularity-contest line 104.

(with the former line repeated some tens times)


Any hint on these messages?

share|improve this question
    
It's the same as this debian bug: bugs.debian.org/cgi-bin/bugreport.cgi?bug=608672 fix was released on the 13th in 'denyhosts 2.6-9' Natty uses 2.6-8! –  Rinzwind May 30 '11 at 9:18
    
I'll check that, ty... –  luri May 31 '11 at 13:22

2 Answers 2

up vote 3 down vote accepted

The denyhosts error seems to be Debian Bug #608672. It seems that the logrotate script for denyhosts tries to execute /etc/denyhosts.conf as a shell script to access the configuration variables.

While your configuration file is fine for denyhosts itself, it causes the logrotate script to fail. It looks like the problem has been fixed for the 11.10 release but the fix has not yet been released as an update for 11.04.

You should be able to work around the problem by removing the spaces before and after the equals sign on each line of your /etc/denyhosts.conf file.

share|improve this answer
    
Changed the logrotate script according to what is suggested in the bug page.... I'll have to wait for a week until I get (or don't get) anacron mail, but, for now, I'll mark your answer as accepted :). –  luri Jun 2 '11 at 19:12

The popularity contest mail is a known bug in 10.10, still not fixed in 11.10 - run

sudo dpkg-reconfigure popularity-contest

to fix it.

Regards John

share|improve this answer
    
I'll try that as well, thanks. –  luri Nov 15 '11 at 9:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.