Determining S-1-5-32-500 account

delphi package - easy access to security apis
Post Reply
mervinpearce
Posts: 1
Joined: Wed Nov 01, 2006 3:43 pm

Determining S-1-5-32-500 account

Post by mervinpearce »

I would like to determine the wkAdmin account (Administrator) even if it has been renamed. Is it possible with madSecurity?
madshi
Site Admin
Posts: 10528
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Sure. It's as easy as this:

Code: Select all

function GetAdminName : string;
begin
  result := Account('S-1-5-32-500').Name;
end;
But please note that the "32" in the SID is only valid for your domain. It might be different for another domain.
Post Reply