On Tue, Mar 1, 2011 at 9:43 AM, Chris Jackson cjackson@pasco.k12.fl.us wrote:
Based on the way he appears to be trying to route log messages syslogd would need the ability to write to the log file in /var/log not the slapd user unless he is using the slapd.conf call to logfile.
A couple of things to look at:
Is there an entry in you slapd.conf for logfile? i.e. logfile /var/log/slapd
Copying from my original post, this is what I have:
and in the slapd.conf file I have
loglevel 11560 logfile /var/log/slapd.log
Try using a a different local4 call in your syslogd.conf. local4.* /var/log/slapd
Well, I found out I really can't. It seems the stock solaris syslog does not like a "*" as the priority. It took me a bit to figure that one out, but that is why I chose to be explicit. I know I should just but rsyslog or syslog-ng, but right now I just want to make sure I can make it talk to the stock syslog before adding more variables to my mess. =)
I have found that if you have the local4.* redirect in syslogd and a logfile call in your slapd.conf going to same /var/log/slapd it will get overwritten, have permission issues, and not log.
Chris Jackson
On Mar 1, 2011, at 9:27 AM, Germ van Ek wrote:
Unless your openldap is running as root (which it shouldn't), it won't be able to write to the logfile, as only the user root has permissions to do this. Make sure your ldap user can write to this file.
-----Oorspronkelijk bericht----- Van: openldap-technical-bounces@OpenLDAP.org [mailto:openldap-technical-bounces@OpenLDAP.org] Namens Mauricio Tavares Verzonden: dinsdag 1 maart 2011 15:18 Aan: openldap-technical Onderwerp: openldap does not want to write log files?
I am feeling rather confused here. I installed openldap in a solaris10/sparc box but I do not seem to persuade it to write to a log file. FYI, right now I am running slapd as root so permissions AFAIk should not be the issue. FYI, syslog here is the old, non-rsyslog/syslog-ng variety.
So, in the /etc/syslog.conf file I have:
local4.info /var/log/ldap.log local4.err /var/log/ldap.log local4.notice /var/log/ldap.log
which makes me think I should be covering every possible message sent by slapd. Now /var/log/ldap.log is created as
-rw------- 1 root sys 0 Feb 28 16:21 ldap.log
and in the slapd.conf file I have
loglevel 11560 logfile /var/log/slapd.log
which not only should mean slapd is blabbing a lot to the log file. Also note I am telling it to write to /var/log/slapd.log,
-rw------- 1 root sys 0 Mar 1 07:39 slapd.log
When I start slapd (after restarting syslog just in case), nothing is written to those two log files. In fact, the only clue that something happened is the data in slapd.log changed:
-rw------- 1 root sys 0 Feb 28 16:21 ldap.log -rw------- 1 root sys 0 Mar 1 07:40 slapd.log
Anything I am missing here?
--
--