directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: Kerberos Can't Find Users
Date Thu, 22 Apr 2010 21:33:24 GMT
>
> On Thu, Apr 22, 2010 at 12:22 PM, Stefan Seelmann<seelmann@apache.org>wrote:
>    
>> Please make sure that the password is binary, you could use
>> StringTools.getBytesUtf8( String ).
>>
>>      
> That method doesn't seem to exist,
it does, in shared-ldap jar.

> but this seems to work:
> entry.add("userPassword", password.getBytes());
>    
It's not suffisant : it's system dependent. If your local is not UTF-8, 
you may get some bad surprise...

Or you can use :

try
{
   entry.add("userPassword", password.getBytes( "UTF-8" )
}
catch ( UnsupportedEncodingException uee )
{
   throw new RuntimeException( uee );
}

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.nextury.com



Mime
View raw message