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

Re: ldap auth does not works after openldap upgrade



On Tue, Feb 15, 2011 at 10:24 AM, Andrew Findlay
<andrew.findlay@skills-1st.co.uk> wrote:
>
> It sounds as if there is no data in the LDAP server.
>
> Debian Lenny seems to use OpenLDAP 2.4.11 with db4.2
> I suspect that Squeeze uses later versions of both, so it is very
> unlikely to be able to read the original database files.
> I do not know what the Lenny->Squeeze update process does with LDAP
> data - I would hope that it creates an LDIF and re-imports it, but in
> your case something has obviously gone wrong.
>
> You should look in the logs for complaints at startup time which might
> give some clues. If you do not find any logs, try adding '-d 768' to the
> slapd startup command to make it log to stdout.
>
> As your server appears to be running, you could check that it has your
> suffix configured:
>
> ldapsearch -x -LLL -b '' -s base '(objectclass=*)' namingcontexts
>
> If my guess about DB files is right, you will need to re-load the data
> from an LDIF backup file. Something like this:
>
>        Stop the server
>        Preserve the existing database files somewhere safe
>        Create a new empty database (i.e. an empty DB directory,
>                possibly with a DB_CONFIG file in it)
>        Load the LDIF file using slapadd (do this as the openldap user)
>        Start the server
>
> Andrew
> --

Hi Andrew.

The ldapsearch you gave me returned the following output:
chester@reploid:~$ ldapsearch -h ldap.server -x -LLL -b '' -s base
'(objectclass=*)' namingcontexts
dn:
namingContexts: dc=dominio,dc=com,dc=br

I think It's ok, cause that's precisely the root of my ldap tree.

Just another info: when I was on the root shell and tried to change to
another user, i did changed, but i gave some errors:

fileserver:~# su - lscarneiro
I have no name!@fileserver:~$ whoami
whoami: cannot find name for user ID 1130

but than i read this link that dan gave me:
http://www.debian.org/releases/stable/i386/release-notes/ch-whats-new.en.html#new-ldap
and installed the libnss-ldapd and libpam-ldapd packages as
recommended.  but now i can't even 'su' to my username:

fileserver:~# su - lscarneiro
Unknown id: lscarneiro

It's seems that the unix and samba database have lost their sync. I'll
try to execute the backup/restore in a new db dir as you said and post
the results here. This backup need to be from a point before the
upgrade or a can simple get a dump of the actual database?

Sorry for my poor english.