How to get current user SID in Mac OS X For my application purpose, I want to get the user information from Active Directory. Especially I want to get current user SID and user account domain SID. Can anyone tell me some way to get this user information?

PS: Any approach is highly preferable (e.g. by running terminal commands or getting the user information from Objective C code).
In the shell you may use the command dsmemberutil to get at least the user SID:

Example to get the SID of a user by username:

% dsmemberutil getsid -U username