From owner-freebsd-questions@FreeBSD.ORG Mon Nov 10 09:56:04 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3765616A4CE for ; Mon, 10 Nov 2003 09:56:04 -0800 (PST) Received: from deimos.frii.net (deimos.frii.net [216.17.128.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5821F43FAF for ; Mon, 10 Nov 2003 09:56:03 -0800 (PST) (envelope-from aaron@justaaron.com) Received: from justaaron.com (dsc02-ari-co-204-32-195-122.rasserver.net [204.32.195.122]) by deimos.frii.net (8.12.10/8.12.10) with ESMTP id hAAHtt0E022994; Mon, 10 Nov 2003 10:55:59 -0700 (MST) Message-ID: <3FAFD122.8030609@justaaron.com> Date: Mon, 10 Nov 2003 10:55:46 -0700 From: Aaron User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031029 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matthew Seaman References: <3FAEF4AD.2050809@justaaron.com> <20031110083421.GA8828@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20031110083421.GA8828@happy-idiot-talk.infracaninophile.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Can't /.../rc.d/slapd.sh start X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: aaron@justaaron.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2003 17:56:04 -0000 Matthew Seaman wrote: > On Sun, Nov 09, 2003 at 07:15:09PM -0700, Aaron wrote: > >>Hmmm, I just noticed this in the debug output from slapd.sh >> >>+ /usr/local/libexec/slapd -u ldap -g ldap >>+ _return=1 >>+ [ 1 -ne 0 ] >>+ [ -z ] >> >>I tried running slapd as above from the command line and failed. > > > slapd should have logged the reason why it didn't start up -- check > /var/log/console.log, /var/log/all.log and /var/log/messages > > If the log message doesn't clarify things, turn up the log level in > /usr/local/etc/openldap/slapd.conf (see slapd.conf(5)). Ahhh... bash-2.05b$ sockstat -4 ... ldap slapd 180 8 tcp4 *:389 *:* ... This after following Dr. M's suggestion and looking in all.log (cough after turning it on cough cough). Which showed this: Nov 10 10:09:06 haiku slapd[289]: bdb_initialize: Sleepycat Software: Berkeley DB 4.1.25: (December 19, 2002) Nov 10 10:09:06 haiku slapd[289]: could not open config file "/usr/local/etc/openldap/schema/core.schema": Permission denied (13) Nov 10 10:09:06 haiku slapd[289]: slapd shutdown: freeing system resources. Nov 10 10:09:06 haiku slapd[289]: slapd stopped. Nov 10 10:09:06 haiku slapd[289]: connections_destroy: nothing to destroy. Permission denied for core.schema? Changed ownership and group for all schema files: # chown ldap:ldap openldap/schema/*.schema Which didn't change things. Changed ownership and group for the directory holding the schema files: # chown ldap:ldap openldap/schema Which did the trick. Nov 10 10:33:09 haiku slapd[179]: bdb_initialize: Sleepycat Software: Berkeley DB 4.1.25: (December 19, 2002) Nov 10 10:33:09 haiku slapd[179]: line 21 (allow bind_v2) Nov 10 10:33:09 haiku slapd[179]: line 61 (database bdb) Nov 10 10:33:09 haiku slapd[179]: bdb_db_init: Initializing BDB database Nov 10 10:33:09 haiku slapd[179]: line 64 (suffix "dc=krelm, dc=com") Nov 10 10:33:09 haiku slapd[179]: line 65 (rootdn "dc=krelm, dc=com") Nov 10 10:33:09 haiku slapd[179]: line 69 (rootpw ***) Nov 10 10:33:09 haiku slapd[179]: line 73 (directory /var/db/openldap-data) Nov 10 10:33:09 haiku slapd[179]: line 75 (index objectClass eq) Nov 10 10:33:09 haiku slapd[179]: index objectClass 0x0004 Nov 10 10:33:10 haiku slapd[180]: slapd starting Nov 10 10:33:10 haiku slapd[180]: daemon: added 8r Nov 10 10:33:10 haiku slapd[180]: daemon: select: listen=8 active_threads=0 tvp=NULL It's strange that the port would install rc.d/slapd.sh to call slapd with -u ldap -g ldap, yet not set the permissions on these schema files and directories accordingly. Anyway, thanks Dr. M. -- Aaron aaron@justaaron.com