The number returned as the "Primary GRoup" identifier is actually the RID of an object in the SAM - that object being a group.

You can work through a variety of methods to return the name such as:

Get the domain SID and append this number (RID) to get the Groups SID and do a reverse lookup.

Dump ALL accounts using my DumpDomain.exe which shows the name of the account and the RID on the same line.

There a Perl mechanism that will let me resolve the name with the RID. This function(Win32::NetAdmin::GetUserGroupFromRID) could be generically exposed in my Win32Admin.DLL.

[ 22. November 2002, 18:18: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/