No announcement yet.

Set Primary Group on multiple users

  • Filter
  • Time
  • Show
Clear All
new posts

  • Set Primary Group on multiple users

    Can Hyena be used to set the primary group for multiple users at once?
    We need to remove a large number of users from the Domain Users group and cannot do that until we change their primary group to something else.
    When I tried to remove them from the Domaon Users as a group it failed with no error message.

  • #2
    Re: Set Primary Group on multiple users

    The only solution I can recommend is a utility called ntuser.exe which is part of a suite of utilities called NTSec at

    It is a command line utility that can be run from a batch file to update user properties, including Primary Group.

    You can use Hyena to create the batch file for you to save some time.


    • #3
      This can be done in current versions of Hyena, and here are a couple of different options:

      1. Select a few test users in Hyena's right-hand window, then right-click and choose Manage Directory Attributes. Choose the option to Show only these attributes, then on the right side find and click on primaryGroupID, click the Add icon, then click OK. On the next dialog that comes up enter the group ID for the new group, for Domain Users it is 513. Click OK and Hyena will set that value for the selected users.

      2. In Hyena v10, we now have the new Active Editor that allows for editing information in a spread-sheet manner. To see this method run a query that has the fields needing modification, in this case right-click on All Users and choose Query Active Directory -> Users(Detailed-General). Verify that primaryGroupID is one of the columns, then select a few test users, right-click and choose Edit with 'Active Editor'. Once in Active Editor find the primaryGroupID field and enter the new value down through the list of users requiring modification. While there, changes to other fields can be made at this time as well.

      One thing to keep in mind with either of these methods is the users being modified will need to already be members of the group being set as primary or an error will be triggered when trying to set primary group for those users.