'Retrieve unix UID/GID from MS Active Directory using DCE RPC


We are trying to retrieve data from Active Directory using DCE RPC calls.
So far we succeeded to connect, to logon user using NetLogon::LogonSamLogonEx RPC command and to get user data. (C++ on linux)

Now we need to extract unix UID/GID of a user and GID of a group using SID. (RFC2307) Any idea what protocol/endpoint/operation to use to do this via DCE RPC? Is it even possible or we have to use LDAP?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source