Open grishick opened 1 year ago
Try changing
final RPCTransport transport = SMBTransportFactories.SRVSVC.getTransport(smbSession);
to
final RPCTransport transport = SMBTransportFactories.LSASVC.getTransport(smbSession);
I was able to get the same error (while searching for how to do this - really need some docs), and since this is a LSA service, tried that instead and it worked. Also, is your connection to a DC? IE, is your host you are asking capable of doing the work? I had to point to our AD DC instead of the SMB File Server.
Describe the bug I am trying to create a Nifi processor that reads account permissions. I am able to connect and authenticate to SMB service, but I am not able to open a policy handle. This line
PolicyHandle handle = service.openPolicyHandle(adServerNameorNull, Integer.parseInt(accessLevel));
always results innca_s_fault_ndr (0x000006F7)
error from Active Directory. According to Microsoft docs this error meansRPC_X_BAD_STUB_DATA
To Reproduce Steps to reproduce the behavior:try using
LocalSecurityAuthorityService::openPolicyHandle()
Code that reproduces the behavior: This is the code:
Expected behavior
openPolicyHandle
should returnPolicyHandle
objectEnvironment (please complete the following information):