DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 275523 - Last Review: October 11, 2007 - Revision: 3.2

This article was previously published under Q275523

SYMPTOMS

When you view Active Directory with a Lightweight Directory Access Protocol (LDAP) utility such as Ldp.exe, the Members attribute is not populated with the Primary group.

The memberof attribute of the user object is not populated with the group name. This can cause problems if programs do not query Active Directory for the PrimaryGroupID attribute, and only for the Members attribute of the group.

CAUSE

This behavior occurs because Microsoft Windows 2000 has a group membership limitation of 5000 users. This behavior is due to a limitation in the size of the attribute that is being replicated. The primary group allows one group per user to hold more than 5000 users. By default, every user is a member of the Domain Users group.

The Microsoft Windows Server 2003 Forest mode removes this group membership limitation. However, the primary group is still used in the same way.

RESOLUTION

To resolve this behavior, create a separate attribute called PrimaryGroupID. When you do this, all users can be a member of the Domain Users global group, but instead of explicitly adding them to the Domain Users group membership, assign the user a value for this group in the PrimaryGroupID value. The PrimaryGroupID value is the RID of the group which is assigned as the user's Primary group.
To make sure that the user has the appropriate access to resources in the domain, you not only calculate group membership based on the memberof attribute, you also query for the value of the PrimaryGroupID of the user accounts. When you do this, you create the user's Token, and include the Primary group at the log-on process for all of the groups of which the user is a member.

Programs that need to query groups to give users access that is based on group membership should also query for the PrimaryGroupID attribute.

If more than 5000 users need to be added to a group, work around the 5000 member limitation for groups by using nested groups under a master (parent) group.

MORE INFORMATION

The Primary Group ID (PrimaryGroupID) is an integer value that represents the primary group ID for this user.

The following example describes how to obtain the PrimaryGroupID user attribute by using Microsoft Visual Basic (VB) script:
   Set usr = GetObject("WinNT://TestDomain/JSmith")
   UserID = usr.Get("PrimaryGroupID")
   MsgBox "The User's Primary Group ID is:"& UserID
				

APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, 64-Bit Datacenter Edition
  • Microsoft Windows Server 2003, Standard x64 Edition
Keywords: 
kbenv kbprb KB275523
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support