Migrating from Centos 5 NT4 style to Centos 7 issues

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Migrating from Centos 5 NT4 style to Centos 7 issues

Samba - General mailing list
Hi.

I want to move my current domain running centos 5 to centos 7.

Samba3x ==>Samba4x
openldap 2.3x==>2.4.x

I move my ldap backup that I got from backups:

slapcap -l mydomain.ldif

Next move my config files to the new server:
/etc/ldap.conf
/etc/openldap/slapd.conf
/etc/openldap/ldap.conf

Schemas are correct.

Copy DB_CONFIG that doesn't exist on openldap 2.4, to /var/lib/ldap/

Restore ldap backup.

slapadd -l mydomain.ldif

But I got this error:

slapadd -l /opt/mydomain.ldap
58ecf8a3 The first database does not allow slapadd; using the first
available one (2)
slapadd: line 1: database #2 (dc=my-domain,dc=com) not configured to hold
"dc=mydomain,dc=local"; no database configured for that naming context
_                       0.10% eta   none elapsed            none spd   2.1
M/s
Closing DB...

Looks like I miss something?

Thanks.
--
LIving the dream...
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Migrating from Centos 5 NT4 style to Centos 7 issues

Samba - General mailing list
Hi Alberto,

I currently don't have an OpenLDAP server running, but let's try it
anyway. :-)


Am 11.04.2017 um 21:44 schrieb Alberto Moreno via samba:
> Next move my config files to the new server:
> /etc/ldap.conf
> /etc/openldap/slapd.conf
> /etc/openldap/ldap.conf

Can you make sure that there is no /etc/openldap/slapd.d/ directory? If
it exists, delete it - otherwise your slapd.conf is not used. You can
later convert your slapd.conf into the directory-style configuration if
you want.



> Copy DB_CONFIG that doesn't exist on openldap 2.4, to /var/lib/ldap/

* Does there anything exist in this directory? If yes, delete it.
* Restore your DB_CONFIG file.
* Start slapd to create the initial database files.
* Stop slapd again. slapadd works offline.




> Restore ldap backup.
>
> slapadd -l mydomain.ldif

Just to make sure that the command uses your config:
# slapadd -l mydomain.ldif -f /etc/openldap/slapd.conf



> But I got this error:
>
> slapadd -l /opt/mydomain.ldap
> 58ecf8a3 The first database does not allow slapadd; using the first
> available one (2)
> slapadd: line 1: database #2 (dc=my-domain,dc=com) not configured to hold
> "dc=mydomain,dc=local"; no database configured for that naming context
> _                       0.10% eta   none elapsed            none spd   2.1

Do you have multiple databases configured in slapd.conf? If yes,
temporarily remove the ones you don't need for the import.

Other than that, if your slapd.conf isn't mixed with an existing slapd.d
directory, it might help to see the slapd.conf

If the previous hints do not help, you can send me an email off-list
with your slapd.conf and an LDIF file that contains the a few top level
entries. Then I can have a look tomorrow evening.


Regards,
Marc

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Migrating from Centos 5 NT4 style to Centos 7 issues

Samba - General mailing list
I vaguely remember some issue where openldap between versions went from
using a single file for config to a multiple file config.    I think you
could use the slapcat command to convert.



On 04/11/17 16:16, Marc Muehlfeld via samba wrote:

> Hi Alberto,
>
> I currently don't have an OpenLDAP server running, but let's try it
> anyway. :-)
>
>
> Am 11.04.2017 um 21:44 schrieb Alberto Moreno via samba:
>> Next move my config files to the new server:
>> /etc/ldap.conf
>> /etc/openldap/slapd.conf
>> /etc/openldap/ldap.conf
>
> Can you make sure that there is no /etc/openldap/slapd.d/ directory?
> If it exists, delete it - otherwise your slapd.conf is not used. You
> can later convert your slapd.conf into the directory-style
> configuration if you want.
>
>
>
>> Copy DB_CONFIG that doesn't exist on openldap 2.4, to /var/lib/ldap/
>
> * Does there anything exist in this directory? If yes, delete it.
> * Restore your DB_CONFIG file.
> * Start slapd to create the initial database files.
> * Stop slapd again. slapadd works offline.
>
>
>
>
>> Restore ldap backup.
>>
>> slapadd -l mydomain.ldif
>
> Just to make sure that the command uses your config:
> # slapadd -l mydomain.ldif -f /etc/openldap/slapd.conf
>
>
>
>> But I got this error:
>>
>> slapadd -l /opt/mydomain.ldap
>> 58ecf8a3 The first database does not allow slapadd; using the first
>> available one (2)
>> slapadd: line 1: database #2 (dc=my-domain,dc=com) not configured to
>> hold
>> "dc=mydomain,dc=local"; no database configured for that naming context
>> _                       0.10% eta   none elapsed            none
>> spd   2.1
>
> Do you have multiple databases configured in slapd.conf? If yes,
> temporarily remove the ones you don't need for the import.
>
> Other than that, if your slapd.conf isn't mixed with an existing
> slapd.d directory, it might help to see the slapd.conf
>
> If the previous hints do not help, you can send me an email off-list
> with your slapd.conf and an LDIF file that contains the a few top
> level entries. Then I can have a look tomorrow evening.
>
>
> Regards,
> Marc
>


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Migrating from Centos 5 NT4 style to Centos 7 issues

Samba - General mailing list
Yes, is working.

Marc, the issue was the slap.d folder inside /etc/openldap/, once I delete
I follow my own manual about migrating LDAP to other server and still
working.

Now, I will continue with samba, thanks guys!!!

On Tue, Apr 11, 2017 at 1:50 PM, Gaiseric Vandal via samba <
[hidden email]> wrote:

> I vaguely remember some issue where openldap between versions went from
> using a single file for config to a multiple file config.    I think you
> could use the slapcat command to convert.
>
>
>
>
> On 04/11/17 16:16, Marc Muehlfeld via samba wrote:
>
>> Hi Alberto,
>>
>> I currently don't have an OpenLDAP server running, but let's try it
>> anyway. :-)
>>
>>
>> Am 11.04.2017 um 21:44 schrieb Alberto Moreno via samba:
>>
>>> Next move my config files to the new server:
>>> /etc/ldap.conf
>>> /etc/openldap/slapd.conf
>>> /etc/openldap/ldap.conf
>>>
>>
>> Can you make sure that there is no /etc/openldap/slapd.d/ directory? If
>> it exists, delete it - otherwise your slapd.conf is not used. You can later
>> convert your slapd.conf into the directory-style configuration if you want.
>>
>>
>>
>> Copy DB_CONFIG that doesn't exist on openldap 2.4, to /var/lib/ldap/
>>>
>>
>> * Does there anything exist in this directory? If yes, delete it.
>> * Restore your DB_CONFIG file.
>> * Start slapd to create the initial database files.
>> * Stop slapd again. slapadd works offline.
>>
>>
>>
>>
>> Restore ldap backup.
>>>
>>> slapadd -l mydomain.ldif
>>>
>>
>> Just to make sure that the command uses your config:
>> # slapadd -l mydomain.ldif -f /etc/openldap/slapd.conf
>>
>>
>>
>> But I got this error:
>>>
>>> slapadd -l /opt/mydomain.ldap
>>> 58ecf8a3 The first database does not allow slapadd; using the first
>>> available one (2)
>>> slapadd: line 1: database #2 (dc=my-domain,dc=com) not configured to hold
>>> "dc=mydomain,dc=local"; no database configured for that naming context
>>> _                       0.10% eta   none elapsed            none spd
>>>  2.1
>>>
>>
>> Do you have multiple databases configured in slapd.conf? If yes,
>> temporarily remove the ones you don't need for the import.
>>
>> Other than that, if your slapd.conf isn't mixed with an existing slapd.d
>> directory, it might help to see the slapd.conf
>>
>> If the previous hints do not help, you can send me an email off-list with
>> your slapd.conf and an LDIF file that contains the a few top level entries.
>> Then I can have a look tomorrow evening.
>>
>>
>> Regards,
>> Marc
>>
>>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>



--
LIving the dream...
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Migrating from Centos 5 NT4 style to Centos 7 issues

Samba - General mailing list
Am 12.04.2017 um 00:04 schrieb Alberto Moreno via samba:
> Marc, the issue was the slap.d folder inside /etc/openldap/, once I delete
> I follow my own manual about migrating LDAP to other server and still
> working.

Just a note:

You can manually convert your slapd.conf to the new slapd.d format. Or
you wait, and it will happen automatically after CentOS/Red Hat releases
the next updated OpenLDAP package.

However, after you (or the updated package) converted the file, only the
content in the slapd.d directory is used. Just in case you make some
changes in the slapd.conf file and wonder why it's the changes do not
take effect.


Regards,
Marc



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Loading...