Returning the Username from the SID

Simo Sorce idra at samba.org
Fri Sep 7 01:20:02 GMT 2001


On Thu, Sep 06, 2001 at 01:48:51PM -0500, Hamilton, Kent wrote:
> If I'm sending this to the wrong place could someone re-direct me? 
> 
> We have an application where on a Linux system that uses LDAP to look up the
> users SID from the LDAP server in MS Exchange server.  I then need to change
> this back into a NT username to generate an account name in a MySQL
> database.  I'm sure that there is a simple way to do this using the SAMBA
> libraries and I've glanced at the code and found the
> map_domain_sid_to_name() call but I'm sure there must be a lot more to it
> than just calling that. Can someone point me in the correct direction on
> what I need to do for this please?
> 
> I'm not on this list so please reply to me directly.
> 

try with rpcclient, I think you will need to extract the rid from the
sid to do that, but it is simlpe, the rid is the last part of the sid.

Have fun.

Simo.

-- 
Simo Sorce       idra at samba.org
-------------------------------
Samba Team http://www.samba.org




More information about the samba-technical mailing list