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

Re: crypt



> hello grp,
> i am trying to enable use password in crypt form&authenticate the use..
>
> whatz the diff b/w these 2 cmds..
> 1.This works..
> ldapsearch -h 127.0.0.1 -x -b "dc=kovaiteam,dc=com" "objectClass=*" -D
> "cn=admin,ou=Development,dc=kovaiteam,dc=com" -w admin
> # extended LDIF
> #
> # LDAPv3
> # base <dc=kovaiteam,dc=com> with scope sub
> # filter: objectClass=*
> # requesting: -D cn=admin,ou=Development,dc=kovaiteam,dc=com -w admin
> #
> # kovaiteam.com
> dn: dc=kovaiteam,dc=com
> # Manager, kovaiteam.com
> dn: cn=Manager,dc=kovaiteam,dc=com
> # Development, kovaiteam.com
> dn: ou=Development,dc=kovaiteam,dc=com
> # shs, Development, kovaiteam.com
> dn: cn=shs,ou=Development,dc=kovaiteam,dc=com
> # admin, Development, kovaiteam.com
> dn: cn=admin,ou=Development,dc=kovaiteam,dc=com
> # search result
> search: 2
> result: 0 Success
>
>
>
>
> 2ldapsearch -x -h 127.0.0.1 -x -D
> "cn=admin,ou=Development,dc=kovaiteam,dc=com" -w admin -b
> "dc=kovaiteam,dc=com" "objectClass=*"
>
> ldap_bind: Invalid credentials (49)
>
>
> where i am wrong..

The answer is in the messages you get.  Your system's getopt() seems to
strictly honor the order of the options, so in the first case those that
come after the filter are not treated as options, but rather requested as
(invalid) attributes:

> # requesting: -D cn=admin,ou=Development,dc=kovaiteam,dc=com -w admin

In the latter case, ldapsearch is trying to bind, but doesn't succeed. 
The reason is in the server's log, any error during bind is reported as
"Invalid credentials" for security reasons.  I recall that "credentials"
is the pair name/password, so either the DN or the password (or both) is
wrong/non accessible.

p.


    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497