Date: Thu, 28 Oct 2010 12:19:23 -0400 From: Tim Dunphy <bluethundr@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: start slapd automatically Message-ID: <AANLkTim85XA1dD%2BhOE-jfHOnqk7nSpE52Oyj5W9-ux_M@mail.gmail.com> In-Reply-To: <44fwvqwbxl.fsf@be-well.ilk.org> References: <AANLkTinarysfg8k4dSoy-HbJer54ZiwWdJyhpAYYKKfP@mail.gmail.com> <44fwvqwbxl.fsf@be-well.ilk.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <freebsd-questions-local@be-well.ilk.org> wrote: > Tim Dunphy <bluethundr@gmail.com> 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!!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim85XA1dD%2BhOE-jfHOnqk7nSpE52Oyj5W9-ux_M>