Show Table of Contents
13.3. Adding and Removing User or Host Group Members
To add members to user groups, you can use:
- The IdM web UI (see the section called “Web UI: Adding a Member to a User or Host Group”)
- The command line (see the section called “Command Line: Adding a Member to a User Group”)
Important
When adding another user group as a member, do not create recursive groups. For example, if Group A is a member of Group B, do not add Group B as a member of Group A. Recursive groups can cause unpredictable behavior.
To remove members from user groups, you can use:
- The IdM web UI (see the section called “Web UI: Removing a Member from a User Group”)
- The command line (see the section called “Command Line: Removing a Member from a User Group”)
Note
After you add a member to a user or host group, the update may take some time to spread to all clients in your Identity Management environment. This is because when any given host resolves users, groups or netgroups, the
System Security Services Daemon (SSSD) first looks into its cache and performs server lookups only for missing or expired records.
To see the changes applied to the host group immediately, update the
SSSD cache on your host by using the cache purge utility, sss_cache. Using sss_cache to invalidate the current records in the SSSD cache for a host group forces the SSSD cache to retrieve the updated records from the identity provider, so changes can be realized quickly.
To clear a host group entry in the
SSSD cache:
# sss_cache -n host_group_name
Web UI: Adding a Member to a User or Host Group
- Click → and select or in the left sidebar.
- Click the name of the group.
- Select the type of group member you want to add. For example, Users, User Groups, or External for user groups.

Figure 13.3. Adding User Group Members
- Click .
- Select the member you want to add, and click to confirm.
Command Line: Adding a Member to a User Group
- Optional. Use the
ipa group-findoripa hostgroup-findcommand to find the group. - To add a member to a user group, use the
ipa group-add-membercommand. To add a member to a host group, use theipa hostgroup-add-membercommand.When adding a user group member, specify the member using these options:--usersadds an IdM user--externaladds a user that exists outside the IdM domain, in the format ofDOMAIN\user_nameoruser_name@domain--groupsadds an IdM user group
When adding a host group member, specify the member using these options:--hostsadds an IdM host--groupsadds an IdM host group
Example 13.4. Example commands for adding a member to a user group
To add user1, user2, and group1 to a group named group_name:$ ipa group-add-member group_name --users=user1 --users=user2 --groups=group1
To add ad_user from a domain named ad_domain to a group named group_name, you can choose how to specify the external user. For example:$ ipa group-add-member group_name --external='AD_DOMAIN\ad_user' $ ipa group-add-member group_name --external='ad_user@AD_DOMAIN' $ ipa group-add-member group_name --external='ad_user@AD_DOMAIN.EXAMPLE.COM'
Web UI: Removing a Member from a User Group
- Click → and select or in the left sidebar.
- Click the name of the group.
- Select the type of group member you want to remove. For example, Users, User Groups, or External for user groups.

Figure 13.4. Removing User Group Members
- Select the check box next to the required member.
- Click .
Command Line: Removing a Member from a User Group
- Optional. Use the
ipa group-showoripa hostgroup-showcommand to confirm that the group includes the member you want to remove. - To remove a user group member, use the
ipa group-remove-membercommand. To remove a host group member, use theipa hostgroup-remove-membercommand.When removing a user group member, specify the member using these options:--usersremoves an IdM user--externalremoves a user that exists outside the IdM domain, in the format ofDOMAIN\user_nameoruser_name@domain--groupsremoves an IdM user group
When removing a host group member, specify the member using these options:--hostsremoves an IdM host--groupsremoves an IdM host group
For example, to remove user1, user2, and group1 from a group called group_name:$ ipa group-remove-member group_name --users=user1 --users=user2 --groups=group1

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.