Yes that helped and it worked this time.
I had initially tried with and without the \\ as I was suspicious about it but
I didn't have the -x in my command. I was just using the example straight out
of the advanced guide and I wasn't sure if the \\ meant the command was
continued on the next line or if the \\ was supposed to be included in the
command. The command in the guide doesn't have the -x either.
This is the excerpt from the guide:
$ ldapsearch -h localhost -p 10389 -D "uid=admin,ou=system" -w secret \\
-b "" -s base "(objectClass=*)" * +
version: 1
dn:
supportedLDAPVersion: 3
...
$
Thank you!
Fu-Tung
----- Original Message ----
From: Emmanuel Lecharny <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, January 4, 2008 1:07:21 AM
Subject: Re: Advanced Users Guide
Fu-Tung Cheng wrote:
> Hi Emmanuel,
>
> That get's me a little farther, I've put the output below.. I was
hoping to import the seven seas example into apache ds running in the web
application but I can't seem to get the data into the directory. I
have played around with the standalone version and I tried taking the
standalone data and putting it into the apacheds war working directory but
all that comes up when I connect to the apacheds war is the system
tree (no example tree and no seven seas tree).
>
> Is there an easy way for me to get some sample data into the apacheds
war?
>
I'm just wondering why you do have some \\ into the request ?
ldapsearch -x -h localhost -p 10389 -D "uid=admin,ou=system" -w secret
\\ ....
.......................................................................^^
When I read the trace, I think that ldapSearch is trying to get the
attribute named '\', which obviously does not exist, so you will get
nothing as a result.
Otherwise, the base DN you are using ("") tells the server to start
looking to the rootDSE, a very specific piece of data (in fact, it
contains all the information about the server itself, like the
'company'
who wrote the server - apache - etc.). When you define a base DN, and
if
it's empty, the rootDSE is requested. In order to get information from
any other part of the tree, you have to start at some point. In your
case, it will be -b "dc=xample,dc=org", for instance.
Last, not least, with a -s base, you are requesting a single object,
not
the content of the tree. You can try -s one or -s sub to get more than
one entry.
Hope it helps.
> Thank for the reply and help !!!!
>
> Fu-Tung
>
>
> It is interesting as the servlet search returns what the example
states:
>
> *** ApacheDS RootDSE ***
>
> supportedLDAPVersion: 3
> objectClass: extensibleObject
> objectClass: top
> subschemaSubentry: cn=schema,ou=system
> supportedFeatures: 1.3.6.1.4.1.4203.1.5.1
> vendorName: Apache Software Foundation
> supportedExtension: 1.3.6.1.4.1..1466.20036
> namingContexts: ou=system
> supportedControl: 2.16.840.1.113730.3.4.3
> supportedControl: 2.16.840.1.113730.3.4.7
> supportedControl: 1.3.6.1.4.1.4203.1.10.1
> supportedControl: 2.16.840.1.113730.3.4.2
> vendorVersion: 1.0.2
>
> but the command line still doesn't return the expected result.
>
> $ ldapsearch -x -h localhost -p 10389 -D "uid=admin,ou=system" -w
secret \\ -b "" -s base "(objectClass=*)" * +
> # extended LDIF
> #
> # LDAPv3
> # base <> with scope subtree
> # filter: (objectclass=*)
> # requesting: \ -b -s base (objectClass=*) * +
> #
>
> # search result
> search: 2
> result: 32 No such object
> text: failed on search operation: null:
> SearchRequest
> baseDn : ''
>
> filter : '(2.5.4.0=*) '
> scope : whole subtree
> types
> Only : false
> no limit
> Time Limit : no limit
> Deref Aliases :
> never Deref Aliases
> attributes : 'base', '-s', '-b', '+', '(objectClass=*)', '*',
'\'
> :
> org.apache..directory.shared.ldap.exception..LdapNameNotFo
undException
> at
org.apache.directory.server.core.partition.DefaultPartitionNexus.search(DefaultPartitionNexus.java:859)
> ...
>
>
> ----- Original Message ----
> From: Emmanuel Lecharny <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Thursday, January 3, 2008 11:39:18 PM
> Subject: Re: Advanced Users Guide
>
>
>> $ ldapsearch -h localhost -p 10389 -D "uid=admin,ou=system" -w
secret
>>
> \\ -b "" -s base "(objectClass=*)" * +
>
>>
>>
> Can you try with a -x added in the command line ? The ldapsearch tool
> default to SASL when this option is not set. :
> "-x Use simple authentication instead of SASL."
>
>
>
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs