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).

[EMAIL PROTECTED] ~/git/IV]$ ldapsearch -x [EMAIL PROTECTED] -h admin51  
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: [EMAIL PROTECTED]
# requesting: ALL
#

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

# numResponses: 1
[EMAIL PROTECTED] ~/git/IV]$ ldapsearch -x [EMAIL PROTECTED] -h provision -b 
dc=ivenue,dc=net
# extended LDIF
#
# LDAPv3
# base <dc=ivenue,dc=net> with scope subtree
# filter: [EMAIL PROTECTED]
# requesting: ALL
#

# [EMAIL PROTECTED], users, ivenue.net
dn: [EMAIL PROTECTED],ou=users,dc=ivenue,dc=net
gidNumber: 1000
uidNumber: 1008
shadowMax: 99999
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
objectClass: account
objectClass: CourierMailAccount
uid: [EMAIL PROTECTED]
gecos:: IA==
shadowLastChange: 11740
cn:: IA==
homeDirectory: /netapp1/mail/maildirs/[EMAIL PROTECTED]
description: customerNumber->58144
shadowWarning: 7
mail: [EMAIL PROTECTED]
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

Reply via email to