[jcifs] getAccountName() alwyas return null

Michael B Allen ioplex at gmail.com
Wed Jul 27 18:37:18 MDT 2011


On Wed, Jul 27, 2011 at 5:23 PM, ralflizard <ralfaro2002 at gmail.com> wrote:
> Hi,
>
> I know this post is quite old, but we ran into the same problem using the
> GetOwnerSid.patch to retrieve the owner SID of the file.  Once we got the
> SID and tried to use any of the methods (getAccountName or getDomainName for
> example) all we got was "null".
>
> To solve this we added the following two lines (bold lines) to both the
> getOwnerUser and getOwnerGroup methods that are added by the patch:
>
<snip code fragment>

Hi Rafa,

As described at the top of the API documentation for the jcifs.smb.SID
class, before you can get the names associated with a SID such as with
getAccountName, usually it must first be "resolved" by calling
sid.resolve() or SID.resolveSids().

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jCIFS mailing list