From owner-freebsd-questions@FreeBSD.ORG Thu Oct 28 16:19:26 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A464106566B for ; Thu, 28 Oct 2010 16:19:26 +0000 (UTC) (envelope-from bluethundr@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8A7E68FC1D for ; Thu, 28 Oct 2010 16:19:25 +0000 (UTC) Received: by bwz3 with SMTP id 3so1717126bwz.13 for ; Thu, 28 Oct 2010 09:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=cLmA1oUuMNetg8PrE4wYeNHi1uiNUKQPhpOt0IhnoJg=; b=b1B370TzubcRZAH+wNSmM6reySOHemh5+5YAnRgqfO6/nAusq8GimWMX1n581ylOmk Bq2dQRGXDkzxkUU9yXT+0NayMitgV5LdzwDDGgdAYK1UftTlwUbvwdWZOWlCm1/khVnn AddFPiQaDMHkaP3blu5Oafjtn+FNTtlgHeMDM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ZbVhA+j5cL9Ovsagaf05glQ+C3Yg0+e41N+Ug4WSuCMGq1iKPzARxA+nmav8oCDF6w vgjxYp2J00t/cl9g9G8gcCQO4Sz9FpHu9rBl4broiO1J+q8cVeDL+nv/cKT4YJhwWMkz RoP7WavhPFFiWNZX4bWWWXTt/Iz/eJtWTkX0o= MIME-Version: 1.0 Received: by 10.204.84.156 with SMTP id j28mr8684829bkl.101.1288282764036; Thu, 28 Oct 2010 09:19:24 -0700 (PDT) Received: by 10.204.81.153 with HTTP; Thu, 28 Oct 2010 09:19:23 -0700 (PDT) In-Reply-To: <44fwvqwbxl.fsf@be-well.ilk.org> References: <44fwvqwbxl.fsf@be-well.ilk.org> Date: Thu, 28 Oct 2010 12:19:23 -0400 Message-ID: From: Tim Dunphy To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: start slapd automatically X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 16:19:26 -0000 ok thanks.. this is what I tried: [root@LBSD2:/var/run/openldap]#vi /usr/local/etc/rc.conf # -- sysinstall generated deltas -- # Sun Aug 15 18:54:08 2010 # Created: Sun Aug 15 18:54:08 2010 # Enable network daemons for user convenience. # Please make all changes to this file, not to /etc/defaults/rc.conf. # This file now contains just the overrides from /etc/defaults/rc.conf. defaultrouter=3D"192.168.1.1" hostname=3D"LBSD2.summitnjhome.com" ifconfig_bge0=3D"inet 192.168.1.44 netmask 255.255.255.0" sshd_enable=3D"YES" apache22_enable=3DYES mysql_enable=3DYES hald_enable=3DYES dbus_enable=3DYES dbus_enable=3D"YES" hald_enable=3D"YES" local_startup=3D"{local_startup} /usr/local/kde4/etc/rc.d" kde4_enable=3D"YES" named_enable=3DYES slapd_enable=3DYES slapd_enable=3D"YES" slapd_flags=3D'-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://192.168.= 1.44/"' slapd_sockets=3D"/var/run/openldap/ldapi" # -- sysinstall generated deltas -- # Thu Sep 16 00:12:09 2010 rpcbind_enable=3D"YES" nfs_server_enable=3D"YES" slapd_enable=3D"YES" [root@LBSD2:/var/run/openldap]#/usr/local/etc/rc.d/slapd restart Stopping slapd. Waiting for PIDS: 6701. Starting slapd. [root@LBSD2:/var/run/openldap]#lsof -U | grep slapd slapd 6824 ldap 3u unix 0xc8950000 0t0 ->0xc46cb19c slapd 6824 ldap 3u unix 0xc8950000 0t0 ->0xc46cb19c [root@LBSD2:/var/run/openldap]#ls -lh /var/run/openldap/ total 8 -rw-r--r-- 1 ldap ldap 0B Oct 28 12:10 ldapi -rw-r--r-- 1 ldap ldap 42B Oct 28 12:15 slapd.args -rw-r--r-- 1 ldap ldap 5B Oct 28 12:15 slapd.pid [root@LBSD2:/var/run/openldap]#cat /var/run/openldap/ldapi [root@LBSD2:/var/run/openldap]# I'm not sure why the socket file is empty at the moment..but I have verified that openLDAP is functioning...I can bounce around the network easily by logging in as the LDAP users... can't actually reboot the machine right now, but hopefully this should work. I'll give a shout the next time I reboot if it doesn't start slapd as expected. thanks! On Thu, Oct 28, 2010 at 11:53 AM, Lowell Gilbert wrote: > Tim Dunphy writes: > > =A0 =A0> =A0I have a quick one for ya.. I am running openLDAP 2.4 server = on my > =A0 =A0> freebsd box and it's coming along nicely. > =A0 =A0> > =A0 =A0> =A0But whenever I reboot the box it doesn't start automatically.= What's > =A0 =A0> the best way to accomplish this? > =A0 =A0> > =A0 =A0> =A0My /etc/defaults/rc.conf has the following entry: > =A0 =A0> > =A0 =A0> =A0local_startup=3D"/usr/local/etc/rc.d" # startup script dirs. > =A0 =A0> > =A0 =A0> =A0 And slapd is living in the location referenced on that line: > =A0 =A0> > =A0 =A0> > =A0 =A0> [root@LBSD2:/usr/home/bluethundr]#ls -l /usr/local/etc/rc.d/slap= d > =A0 =A0> -r-xr-xr-x =A01 root =A0wheel =A03591 Oct =A09 21:37 /usr/local/= etc/rc.d/slapd > =A0 =A0> > =A0 =A0> > =A0 =A0> =A0So I am under the impression that it should be starting there= normally. > > =A0 =A0You probably missed the rc.conf entry, described in the message th= at was > =A0 =A0printed when you installed the port. =A0Specifically: > =A0 =A0In order to run the LDAP server, you need to edit > =A0 =A0 =A0%%PREFIX%%/etc/openldap/slapd.conf > =A0 =A0to suit your needs and add the following lines to /etc/rc.conf: > =A0 =A0 =A0slapd_enable=3D"YES" > =A0 =A0 =A0slapd_flags=3D'-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ > =A0 =A0 =A0ldap://0.0.0.0/"' > =A0 =A0 =A0slapd_sockets=3D"/var/run/openldap/ldapi" > > =A0 =A0Then start the server with > =A0 =A0 =A0%%PREFIX%%/etc/rc.d/slapd start > =A0 =A0or reboot. > > Where %%PREFIX%% is presumably /usr/local. > > --=20 Here's my RSA Public key: gpg --keyserver pgp.mit.edu --recv-keys 5A4873A9 Share and enjoy!!