[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Stranges in databases, searches and mysterious dies...
On 9 May, Turbo Fredriksson wrote:
> I've started to get strangest in my database. I can't search
> for stuff that have been searchable before, and I can't bind to
> the server...
>
> And every now and then the slapd process are taking up a lot of CPU power,
> and every now and then it also dies (during the night usually, so I don't
> know WHY)...
Can't really help you with the CPU and crashing but...
> ---- s n i p -----
> [papadoc.pts/3]$ ldapsearch -b 'uid=turbo,ou=People,dc=papadoc,dc=bayour,dc=com' objectclass=* sn -s one
> ldap_search: No such object
> ldap_search: matched: OU=PEOPLE,DC=PAPADOC,DC=BAYOUR,DC=COM
> [papadoc.pts/3]$ ldapsearch -b 'uid=turbo,ou=People,dc=papadoc,dc=bayour,dc=com' objectclass=* sn -s base
> ldap_search: No such object
> ldap_search: matched: OU=PEOPLE,DC=PAPADOC,DC=BAYOUR,DC=COM
> [papadoc.pts/3]$ ldapsearch -b 'uid=turbo,ou=People,dc=papadoc,dc=bayour,dc=com' objectclass=* sn -s sub
> ldap_search: No such object
> ldap_search: matched: OU=PEOPLE,DC=PAPADOC,DC=BAYOUR,DC=COM
These will probably fail because of filename expansion on your filter.
Try using "(objectclass=*)"
> [papadoc.pts/6]$ ldapsearch -b 'uid=turbo,ou=People,dc=papadoc,dc=bayour,dc=com' uid=turbo sn
> ldap_search: No such object
> ldap_search: matched: OU=PEOPLE,DC=PAPADOC,DC=BAYOUR,DC=COM
This will fail if your default scope is set to "one" (check ldap.conf).
> [papadoc.pts/6]$ ldapsearch uid=turbo sn
> uid=turbo,ou=People,dc=papadoc,dc=bayour,dc=com
> sn=Fredriksson
> [papadoc.pts/6]$ ldapsearch -b 'ou=People,dc=papadoc,dc=bayour,dc=com' uid=turbo sn
> uid=turbo,ou=People,dc=papadoc,dc=bayour,dc=com
> sn=Fredriksson
> ---- s n i p -----
>
>
> ---- s n i p -----
> [pts/4.papadoc]# ldapsearch -D 'uid=turbo,ou=users,dc=papadoc,dc=bayour,dc=com' -W uid=turbo sn
> Enter LDAP Password:
> ldap_bind: Invalid credentials
> ---- s n i p -----
Here you are using ou=users, not ou=people.
> And now to the strangest part of it all!!!
> ---- s n i p -----
> [papadoc.pts/3]$ ldapsearch -b 'uid=turbo,ou=People,dc=papadoc,dc=bayour,dc=com' objectclass=* -s sub
> uid=turbo,ou=People,dc=papadoc,dc=bayour,dc=com
> uid=turbo
...
> modifiersname=cn=admin, ou=People, dc=papadoc, dc=bayour, dc=com
>
> [papadoc.pts/3]$ ldapsearch -b 'uid=turbo,ou=People,dc=papadoc,dc=bayour,dc=com' objectclass=* -s sub
> ldap_search: No such object
> ldap_search: matched: OU=PEOPLE,DC=PAPADOC,DC=BAYOUR,DC=COM
> ---- s n i p -----
> These two commands was with maximum 2 seconds between!!!!
This should have worked (i think, still concerned about the objectclass
thing)
> This is HIGHLY strange, since it worked before the reboot, and I have
> tried change the password with ldappasswd... Can still login with
> the new password, but I can't bind to the LDAP database!
>
> Before the crash I had 'dbcachenowsync', which I removed when the machine
> was back online... The index have been rebuilt.
If you are concerned that the database may be corrupt, just rebuild it.
(shutdown slapd, run ldbcat, mv database.dir database.old, mkdir
database.dir, ldif2ldbm).
> index uid,cn,sn,mail,mailalternateaddress,mailforwardingaddress,package approx,sub
> index uidnumber,gidnumber pres,eq
You might want an eq index on uid and cn.
--
Doug Nazar
Dragon Computer Consultants Inc.
Tel: (416) 708-1578 Fax: (416) 708-8081