Problems with startup on OpenLDAP
Mark Hattam
mark at dxradio.demon.co.uk
Sat Nov 21 05:10:31 PST 2009
I had the bright idea last night of trying OpenLDAP (MacPorts 2.3.35 vs current openldap.org 2.4.19) to see if I could get all my Apple Mail & Thunderbird etc programs to use one common address book.
The Macports install went through OK, and I used the load .plist to apparently run it ... except it didn't seem to run, no output, no logs.
Eventually found (via Google) to run it with -d 5 to get it to print some logging ...
1. it couldn't read it config file due to permissions ... chmod 777 solved that
2. got further, but still died ...
in the end I ran it as
sudo /opt./local/libexec/slapd -d 5
but that just runs it in the active Terminal window. But at least I could now telnet in on port 389 and get some response.
Is OpenLDAP what I should be looking for for providing a common address book to complement the mailserver. Clearly I shouldn't be needing to "sudo" it to get it to run each time I want it.
And 2.3.x doesn't even figure in their "recent changes" on the website. The OpenLDAP website documentation is all 2.4.x
Mark
--
On 27 Apr 2009, at 22:17, Brian Topping wrote:
> Of course I figure this out as soon as I post... lol. I need to get a dog so I can ask him technical problems first.
>
> It appears that the 'ldap' account is not set up with adequate permissions to run. There are a few issues:
>
> 1. /opt/local/var/run is set up with permissions as root:admin mode 755. slapd wants to write it's pid in there, as I presume other daemons will also, so we can't just change the ownership of the directory. In order to fix this, I used dscl to add ldap to the admin group:
>
>> sudo dscl localhost append /Local/Default/Groups/admin GroupMembership ldap
>
> 2. Then make it group writable:
>
>> sudo chmod g+w /opt/local/var/run/
>
> 3. slapd's directories need to be owned by 'ldap' as well:
>
>> sudo chown -R ldap:ldap /opt/local/etc/openldap
>> sudo chown -R ldap:ldap /opt/local/var/openldap-data/
>
> There may have been one or two other tweaks I needed to make over the course of this, but can't remember them now.
>
> Just curious, is this something that should be handled by the install script? I uninstalled and reinstalled the port a few times and it never came up with this.
>
> Thanks, Brian
>
>
> On Apr 27, 2009, at 2:56 PM, Brian Topping wrote:
>
>> Hi all,
>>
>> I searched Trac for this and asked on IRC, hoping someone here has some good info. I've installed OpenLDAP and have it set up to run from the command line properly, but over the course of a few months, have found that my PostgreSQL starts properly via daemondo / launchd and slapd does not.
>>
>> Daemondo is running for the slapd process, but slapd is nowhere to be found.
>>
>> So I tried to hunt down the answer to this paradox over the last several days with vigor and have come up empty.
>>
>> Does anyone have a clue what I should start looking for? The only difference I can smell in this is that OpenLDAP is starting from the command line as root and not starting via daemondo because it's trying to launch as user 'ldap'. But I can't find any logs that would confirm this and thought I would ask here first.
>>
>> Any thoughts appreciated.
>>
>> Brian
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
More information about the macports-users
mailing list