From dev-return-41148-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Mon Jul 9 07:23:54 2012 Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3B15D4DB for ; Mon, 9 Jul 2012 07:23:54 +0000 (UTC) Received: (qmail 4534 invoked by uid 500); 9 Jul 2012 07:23:54 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 4408 invoked by uid 500); 9 Jul 2012 07:23:54 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 4390 invoked by uid 99); 9 Jul 2012 07:23:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2012 07:23:53 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ayyagarikiran@gmail.com designates 209.85.160.50 as permitted sender) Received: from [209.85.160.50] (HELO mail-pb0-f50.google.com) (209.85.160.50) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2012 07:23:47 +0000 Received: by pbbrr4 with SMTP id rr4so22301149pbb.37 for ; Mon, 09 Jul 2012 00:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=/8CXSfdLirKQpdKpTGBWEyaoojqdLDAA98hyhAax0s0=; b=YLcyzKB8+WkTViOtNi+k8XufbVidyoQh7+RTzN1OegCYB0KwYiY8ZZAzcElfzA9pg1 Uo1GA+6moHtyAdZwbCmmU5DtEYhdzcuoBhkOwVh24LB8iyWBSpf8JE5sW2E7QJeDVwzI WcVxG/34xC4Yy/elJyCUa2kxFFF5+PJXyHwU02BleqlxkigbTmk02q8rV5sltry98V9h j/jLDcsB5lPRvBGsZKPIR801SPo/tIJJm6lCDFHw9Mg4kc2+mgLdB+fc3RLN4z4HHCy2 08vwnLIG1QpI/l/JA64LR7F7wLXjW+dEdvIpKDaRTpZZC8fl29YWggSvIrwzrGwt3eNW x/DA== MIME-Version: 1.0 Received: by 10.68.227.195 with SMTP id sc3mr57773441pbc.104.1341818605827; Mon, 09 Jul 2012 00:23:25 -0700 (PDT) Sender: ayyagarikiran@gmail.com Received: by 10.68.138.197 with HTTP; Mon, 9 Jul 2012 00:23:25 -0700 (PDT) In-Reply-To: <34132601.post@talk.nabble.com> References: <34132601.post@talk.nabble.com> Date: Mon, 9 Jul 2012 12:53:25 +0530 X-Google-Sender-Auth: yTRZTvodplZLN264JlGwTCwskXY Message-ID: Subject: Re: ApacheDS - DIGEST-MD5 - INVALID_CREDENTIALS: DIGEST-MD5: cannot acquire password From: Kiran Ayyagari To: Apache Directory Developers List Content-Type: text/plain; charset=ISO-8859-1 DIGEST-MD5 requires the password to be stored in plain text in the server. check if your password is stored in plain text or not, by default ApacheDS stores the passwords in salted-SHA hashes On Mon, Jul 9, 2012 at 12:36 PM, rJassal wrote: > > Hi, > > I am working with ApacheDS 2.0.0-M7 release and trying to connect using > DIGEST-MD5 mechanism using the below code. > > > Hashtable env = new Hashtable(); > > env.put(Context.INITIAL_CONTEXT_FACTORY, > "com.sun.jndi.ldap.LdapCtxFactory"); > env.put(Context.PROVIDER_URL, "ldap://ldap.example.com:10389"); > > env.put(Context.SECURITY_PRINCIPAL, "mborn"); > env.put(Context.SECURITY_CREDENTIALS, "secret"); > env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5"); > env.put( "java.naming.security.sasl.realm", "example.com" ); > > InitialDirContext ctx = new InitialDirContext(env); > > But I am getting this error 'INVALID_CREDENTIALS: DIGEST-MD5: cannot acquire > password'. > > Can anyone please help me in this? > Am I doing something wrong in the code or do I need to make some > configuration changes in ApacheDS? > -- > View this message in context: http://old.nabble.com/ApacheDS---DIGEST-MD5---INVALID_CREDENTIALS%3A-DIGEST-MD5%3A-cannot-acquire-password-tp34132601p34132601.html > Sent from the Apache Directory Project mailing list archive at Nabble.com. > -- Kiran Ayyagari