Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have SVN running via Apache httpd. For authentication we use Active Directory and if the user isn't in AD, we fallback to file authentication. This works fine, except for the error messages in case of file authentication. The error message we get over and over again:

auth_ldap authenticate: user <user> authentication failed; URI /svn/some/uri [User not found][No such object]

We would like to filter out these messages since our log files grows rapidly due to this unnecessary log message.

share|improve this question
I can't personally condone filtering out authentication failures. If this is on a local network and truly is generating that much spam, then there is a misbehaving process that needs to be dealt with. If this is internet facing, forwarding directly to AD without middleware is a really bad idea. – Andrew B Jun 16 '13 at 19:19
up vote 2 down vote accepted

Sorry for answering my own question, but I have implemented a solution that I wanted to share wit you since you were helping me out and it may be of value to others.

Basically its rather simple, I didn't change the logging at all, I just changed the log rotation (/etc/logrotate.d/httpd) to:

/var/log/httpd/*log {
        compresscmd /usr/bin/bzip2
        compressext .bz2
        maxage 31
        rotate 14
                /bin/sed -i '/User not found/d' /var/log/httpd/*svn_error_log
                /sbin/service httpd graceful > /dev/null 2>/dev/null || true

This way all false positives are removed from the log file on a daily basis. The size of the log files is reduced and doesn't grow over time, since the files are removed after 31 days (max).

share|improve this answer

Provided that the intent is to filter these logs to a different file, there are a few ways to go about it.

  1. Send the ErrorLog to syslog and log to different files based on the input.
  2. Use pipe syntax to send the logs to a dedicated helper program, and use it to split the authentication failures off into a separate file. It's recommended to use a dedicated binary in conjunction with this directive in production (not a shell script) as it's performance sensitive.

Turning down LogLevel verbosity is probably a bad idea because it effects other messages within the VirtualHost. Same with LDAPLibraryDebug, and I think those messages are coming from Apache and not the LDAP library anyway.

share|improve this answer

You can disable error log messages at all. Something like

ErrorLog /dev/null

share|improve this answer
Recommending that someone turn off their ErrorLog entirely does not answer the question. (and a bad idea in production environments) – Andrew B Jun 16 '13 at 19:06
As far as I know, there is no way to filter such messages. Only all messages at once – ALex_hha Jun 17 '13 at 9:55
Hi,I Agree that turning the logging off isn't what we want. I only want to exclude the warnings about users not authenticated against AD, since this is in a way a false positive. – JohanKees Jul 4 '13 at 8:03

Your Answer


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.