Hi,
I am running openldap version 2.4.23 on CentOS 6.5, there is no slapd.conf, according to the document it is deprecated. But when I run slapadd, it got an error.
# slapadd -v -l /root/backup.ldif could not stat config file "/etc/openldap/slapd.conf": No such file or directory (2) slapadd: bad configuration file!
Now I am confused, if the slapd.conf is deprecated why the slapadd sdepends on it? How can I generate the slapd.conf, or copy a template of slpad.conf?
Thank you and appreciate your advice
- j
Hi,
there is way of configuration has been updated in newer version. In that case, you may see slapd.d directory under /etc/openldap folder. You may use *ldapadd* to do the same.
OR
If you are familiar with slapd.conf then you can move slapd.d directory somewhere and copy slapd.conf from /usr/share/openldap-servers directory.
if you will not slapd.conf anywhere, please use rpm -ql openldap-servers
May it will help you :P
Cheers> Vikas Parashar
On Fri, Aug 8, 2014 at 6:12 PM, jupiter jupiter.hce@gmail.com wrote:
Hi,
I am running openldap version 2.4.23 on CentOS 6.5, there is no slapd.conf, according to the document it is deprecated. But when I run slapadd, it got an error.
# slapadd -v -l /root/backup.ldif could not stat config file "/etc/openldap/slapd.conf": No such file or directory (2) slapadd: bad configuration file!
Now I am confused, if the slapd.conf is deprecated why the slapadd sdepends on it? How can I generate the slapd.conf, or copy a template of slpad.conf?
Thank you and appreciate your advice
- j
Thanks Vikas. I copied slapd.conf from /usr/share/openldap-servers, modified it and removed /etc/openldap/slapd.d and run the slapadd -l backup.ldif successfully. Should I mv /etc/openldap/slapd.d back and remove /etc/openldap/slapd.conf before start the slapd service?
Thanks.
- j On 8/8/14, Vikas Parashar para.vikas@gmail.com wrote:
Hi,
there is way of configuration has been updated in newer version. In that case, you may see slapd.d directory under /etc/openldap folder. You may use *ldapadd* to do the same.
OR
If you are familiar with slapd.conf then you can move slapd.d directory somewhere and copy slapd.conf from /usr/share/openldap-servers directory.
if you will not slapd.conf anywhere, please use rpm -ql openldap-servers
May it will help you :P
Cheers> Vikas Parashar
On Fri, Aug 8, 2014 at 6:12 PM, jupiter jupiter.hce@gmail.com wrote:
Hi,
I am running openldap version 2.4.23 on CentOS 6.5, there is no slapd.conf, according to the document it is deprecated. But when I run slapadd, it got an error.
# slapadd -v -l /root/backup.ldif could not stat config file "/etc/openldap/slapd.conf": No such file or directory (2) slapadd: bad configuration file!
Now I am confused, if the slapd.conf is deprecated why the slapadd sdepends on it? How can I generate the slapd.conf, or copy a template of slpad.conf?
Thank you and appreciate your advice
- j
Hi,
There is no need to copy slapd.d file any more. Nothing, this is the new way of configuration.
for more information please use it..
http://www.openldap.org/doc/admin24/slapdconf2.html
On Fri, Aug 8, 2014 at 7:04 PM, jupiter jupiter.hce@gmail.com wrote:
Thanks Vikas. I copied slapd.conf from /usr/share/openldap-servers, modified it and removed /etc/openldap/slapd.d and run the slapadd -l backup.ldif successfully. Should I mv /etc/openldap/slapd.d back and remove /etc/openldap/slapd.conf before start the slapd service?
Thanks.
- j
On 8/8/14, Vikas Parashar para.vikas@gmail.com wrote:
Hi,
there is way of configuration has been updated in newer version. In that case, you may see slapd.d directory under /etc/openldap folder. You may
use
*ldapadd* to do the same.
OR
If you are familiar with slapd.conf then you can move slapd.d directory somewhere and copy slapd.conf from /usr/share/openldap-servers directory.
if you will not slapd.conf anywhere, please use rpm -ql openldap-servers
May it will help you :P
Cheers> Vikas Parashar
On Fri, Aug 8, 2014 at 6:12 PM, jupiter jupiter.hce@gmail.com wrote:
Hi,
I am running openldap version 2.4.23 on CentOS 6.5, there is no slapd.conf, according to the document it is deprecated. But when I run slapadd, it got an error.
# slapadd -v -l /root/backup.ldif could not stat config file "/etc/openldap/slapd.conf": No such file or directory (2) slapadd: bad configuration file!
Now I am confused, if the slapd.conf is deprecated why the slapadd sdepends on it? How can I generate the slapd.conf, or copy a template of slpad.conf?
Thank you and appreciate your advice
- j
--On August 8, 2014 at 10:42:27 PM +1000 jupiter jupiter.hce@gmail.com wrote:
Hi,
I am running openldap version 2.4.23 on CentOS 6.5, there is no slapd.conf, according to the document it is deprecated. But when I run slapadd, it got an error.
Try reading the man page for slapadd. If you do, you will find out about the -F option.
--Quanah
Thanks Quanah, that was exactly I was looking for. The problem is, it only works if I copied the whole /etc/openldap/slapd.d from the backup machine to the restore machine.
Would that "slapadd -l backup.ldif" restore the /etc/openldap/slapd.d? If not, it will be certianly fail if restoring backup.ldf to a new machine which has different slapd.d.
- j
On 8/9/14, Quanah Gibson-Mount quanah@zimbra.com wrote:
--On August 8, 2014 at 10:42:27 PM +1000 jupiter jupiter.hce@gmail.com wrote:
Hi,
I am running openldap version 2.4.23 on CentOS 6.5, there is no slapd.conf, according to the document it is deprecated. But when I run slapadd, it got an error.
Try reading the man page for slapadd. If you do, you will find out about the -F option.
--Quanah
-- Quanah Gibson-Mount Server Architect Zimbra, Inc
Zimbra :: the leader in open source messaging and collaboration
--On August 9, 2014 at 11:43:13 AM +1000 jupiter jupiter.hce@gmail.com wrote:
Thanks Quanah, that was exactly I was looking for. The problem is, it only works if I copied the whole /etc/openldap/slapd.d from the backup machine to the restore machine.
Would that "slapadd -l backup.ldif" restore the /etc/openldap/slapd.d? If not, it will be certianly fail if restoring backup.ldf to a new machine which has different slapd.d.
You can backup cn=config using slapcat, as documented in the man pages. You can restore cn=config using slapadd, as documented in the man pages.
--Quanah
openldap-technical@openldap.org