Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 52408 invoked from network); 13 Dec 2007 10:46:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Dec 2007 10:46:53 -0000 Received: (qmail 77677 invoked by uid 500); 13 Dec 2007 10:46:42 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 77647 invoked by uid 500); 13 Dec 2007 10:46:41 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 77636 invoked by uid 99); 13 Dec 2007 10:46:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2007 02:46:41 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 64.233.182.189 as permitted sender) Received: from [64.233.182.189] (HELO nf-out-0910.google.com) (64.233.182.189) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2007 10:46:18 +0000 Received: by nf-out-0910.google.com with SMTP id g16so529899nfd.5 for ; Thu, 13 Dec 2007 02:46:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=vObXQQXxgbVi+/kgg9L+i4fbcZil9tSJZMqsUgI7JMw=; b=EzAn0Ec2dlDNdaKpjKGQd25d93mnr3YA4naVZmrPf5F0yx7ID1qE/0HugCxaXMxGQPtHjtsz4sAoit4no9MMo+TbrAQr+N4FB7KQ+pESSUntHJDb9fAyHfEJJ4Oo0/v/c3K2xiTHDLrZ9XJq1IUBxTYooV9fxWOjNkgJSlyuUkg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=mmmZT2aXvBZQLK33L310n3RWHkQIB37OZpqR3gGZ/iwC22vHrZeWYXotG9LU9pu5OdPhqLGxHLc+qHAB1ckUtjOesiaANhev9IaKvXYfpVDmabYwMK2b/xqpgd77SjCA/Dc5Z1wI5NrEhOFIeKi7rjrpbQ8d9Zgzr3XEN/Nx4KM= Received: by 10.86.98.18 with SMTP id v18mr1704976fgb.18.1197542779319; Thu, 13 Dec 2007 02:46:19 -0800 (PST) Received: from ?192.168.1.5? ( [82.245.116.110]) by mx.google.com with ESMTPS id l19sm1328402fgb.2007.12.13.02.46.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Dec 2007 02:46:18 -0800 (PST) Message-ID: <47610D51.1080006@gmail.com> Date: Thu, 13 Dec 2007 11:45:37 +0100 From: Emmanuel Lecharny User-Agent: Thunderbird 1.5.0.14pre (X11/20071023) MIME-Version: 1.0 To: users@directory.apache.org Subject: Re: Getting a clear text password from Apache DS 1.5.0 References: <6b64cfd50712120732i121f93afv7401b91806a005a8@mail.gmail.com> <47600118.7030002@gmail.com> <6b64cfd50712130136l6c3628fudb9bd61a79c8fd4a@mail.gmail.com> <6b64cfd50712130137k7a37a884nc1737c3ca2461287@mail.gmail.com> <6b64cfd50712130155t5435719cu7825f7444e898d87@mail.gmail.com> In-Reply-To: <6b64cfd50712130155t5435719cu7825f7444e898d87@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org UdayaKiran Ala wrote: > HI All, > Hi, > Yes, I can retrieve a password if it is stored as clear text password. > Below is the sample code snippet > > > Attribute oPwdAttr = attrs.get(ATTR_PASSWORD); > > byte[] pwd = (byte[]) oPwdAttr.get(); > > String sPwd = new String(pwd); > just use this instead : String sPwd = new String( pwd, "UTF-8" ) otherwise you may get some wrong password if you have not ascii chars into the password, depending on your locale. > System.out.println("password is "+sPwd); > > > Thanks > Uday > -- -- cordialement, regards, Emmanuel L�charny www.iktek.com directory.apache.org