[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: cn=config example

Buchan Milne wrote:
On Friday 21 September 2007 06:07:47 Howard Chu wrote:
Use slaptest instead.

except that slaptest doesn't have a "run as another user" flag, and -u is already taken :-(.

Nor do the tools need such an option; you can just use su. The reason slapd can't be started with just "su ldap" is because it may need root privs to open the listener sockets. That's the only reason it has -u/-g options.

At present, it seems that if you want to do the conversion while slapd is running, and for a slapd that runs as non-root, something like this is the best option:

# slapd -u ldap -g ldap -d none -h ldap://localhost:391/ -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d

As then
-The configuration will be converted
-slapd won't start up

What makes you say that?

-you will see any relevant errors
-all the files will be owned by the ldap user/group
-if it succeeds, a restart of slapd is all that is necessary to continue

That seems like far more trouble than just using su...

  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP     http://www.openldap.org/project/