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

Re: moving ldap database and upgrading



On Wed, Jul 18, 2007 at 05:45:06PM -0700, Maria McKinley wrote:

> maude:/etc/ldap# slapadd -v -l ldif
>
> got no error messages, restarted slapd, tried to search on something
> that should be there, but couldn't find it:
>
> maude:/etc/ldap# ldapsearch -x "uid=ichbin"

Typically you specify the base to start at.  Something like 
  dc=u,dc=washington,dc=edu
This will find your user if he/she is located at
  uid=ichbin,o=office,ou=users,dc=u,dc=washington,dc=edu

> # base <> with scope subtree

Set the base and this will start working.  The base should be whatever
you have set as your basedn in your slapd.conf file.

# egrep ^suffix /etc/openldap/slapd.conf
suffix          "dc=ivenue,dc=net"

The following example search has been sanitized but it shows how not
specifying a base DN to search causes it to not know where to look (and
so it looks nowhere).

[todd@tlyons ~/git/IV]$ ldapsearch -x uid=user@domain.com -h admin51  
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: uid=user@domain.com
# requesting: ALL
#

# search result
search: 2
result: 32 No such object

# numResponses: 1
[todd@tlyons ~/git/IV]$ ldapsearch -x uid=user@domain.com -h provision -b dc=ivenue,dc=net
# extended LDIF
#
# LDAPv3
# base <dc=ivenue,dc=net> with scope subtree
# filter: uid=user@domain.com
# requesting: ALL
#

# user@domain.com, users, ivenue.net
dn: uid=user@domain.com,ou=users,dc=ivenue,dc=net
gidNumber: 1000
uidNumber: 1008
shadowMax: 99999
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
objectClass: account
objectClass: CourierMailAccount
uid: user@domain.com
gecos:: IA==
shadowLastChange: 11740
cn:: IA==
homeDirectory: /netapp1/mail/maildirs/user@domain.com
description: customerNumber->58144
shadowWarning: 7
mail: user@domain.com
loginShell: /bin/sh
quota: 314572800S

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
-- 
Regards...		Todd
Exponential problems need logarithmic solutions.         --Eddy Dreger
Linux kernel 2.6.17-6mdv   1 user,  load average: 0.15, 0.37, 0.27