FreeIPA (Identity Management) centralizes LDAP directory data, Kerberos authentication, DNS, and related policies. After you install a server and obtain an administrative Kerberos ticket (kinit), day‑to‑day work is mostly users, groups, and optional HBAC / sudo rules (those are separate topics; this article focuses on accounts and group membership).
You will learn how to
- Authenticate with
kinitand runipacommands. - Create POSIX, non-POSIX, and external groups; assign optional fixed GIDs.
- Find, show, and delete groups; add members and nested groups.
- Create and lock users, set passwords, and inspect raw LDAP-style attributes.
- Use member managers (delegated “who can edit membership”).
- Migrate local
/etc/passwdaccounts with a safer batch pattern (with caveats).
Prerequisites
- A working FreeIPA server and DNS/realm configuration.
- A client or server where the
ipaCLI is installed (typically an enrolled IPA client or the server itself). - A Kerberos principal allowed to run the commands below (usually
adminor another account with sufficient privileges).
Server setup
- How to install and configure FreeIPA on Rocky Linux / CentOS 8
- How to configure FreeIPA replication on Rocky Linux / Alma Linux / CentOS 8
Clients
- Install FreeIPA client on Rocky Linux / Alma Linux / CentOS 8
- Install and configure FreeIPA client on Ubuntu 20.04
- Install FreeIPA client on Fedora 35
Kerberos ticket
To proceed, obtain a ticket for an administrative principal (example realm IPA.CITIZIX.COM—replace with yours):
| |
Default ticket lifetime is commonly 24 hours (policy-dependent). If ipa replies with “Insufficient access” or session errors, refresh with kinit again.
Group concepts in FreeIPA
A group gathers principals so you can attach password policies, sudo, HBAC, RBAC roles, and other policy to many accounts at once. Members can be:
- FreeIPA users
- Other FreeIPA groups (nesting)
- External identities (via external groups and trust/AD integration—not fully covered here)
Group types
| Type | POSIX (GID) | Typical use |
|---|---|---|
| POSIX (default) | Yes | Linux login, file ownership, groups on clients |
| Non-POSIX | No | Policy-only bundles, some trust scenarios |
| External | No | Maps to AD or another source via external member commands |
POSIX groups carry gidNumber for the Linux NSS stack. Design ID ranges (especially with trusts) so numeric UIDs/GIDs never collide.
Built-in groups (common)
admins— administrative IPA users (includesadminby default)ipausers— default shell group for IPA users (membership semantics can vary by version; always check withipa group-show)trust admins— manages Active Directory trust configuration (name contains a space; quote it in shells:"trust admins")
When a user joins a group, policies tied to that group apply—membership alone does not grant shell sudo until you configure sudo rules and HBAC.
Create groups
POSIX group (default)
| |
Non-POSIX group
| |
External group
Used as part of trust workflows; exact nesting into POSIX groups follows IPA docs for your version:
| |
Custom GID
Pick a GID inside an allocated range and avoid clashes with local groups on clients:
| |
Your IPA build may expose the flag as --gid or --gidnumber. Run ipa help group-add on your server and use the option it documents to avoid ID conflicts in your ID range.
Example output (abbreviated):
| |
Find and inspect groups
| |
Note: Filtered ipa group-find output depends on your IPA version and ACLS; treat tutorial counts as illustrations.
Group membership (members—not managers)
Add a user to a group:
| |
Nest a group inside another:
| |
Remove a group (only when policy allows):
| |
Member managers (delegation)
Member managers can add/remove members of a target group without being full IPA admins.
Add jdoe as a member manager of developers:
| |
Allow qa (a group principal) to co-manage developers:
| |
Remove managers:
| |
Nesting groups
To add group_b as a member of group_a:
| |
Remove members from a group
Confirm membership first:
| |
Remove users or nested groups:
| |
Managing users
Interactive create
| |
Follow prompts for first name, last name, login, and so on.
Non-interactive create (common options)
FreeIPA uses long options with double dashes:
| Option | Meaning |
|---|---|
--first | Given name |
--last | Surname |
--cn | Full name override |
--homedir | Home directory |
--shell | Login shell |
--email | |
--password | Prompt for initial password |
--random | Generate a random password (prints once) |
--mobile | Mobile number |
Example:
| |
Password set and change
You do not need to delete and recreate a user to set a password. After ipa user-add, use:
| |
Or modify interactively:
| |
With --password on user-add, IPA prompts during creation:
| |
Lock and unlock
| |
Search and show
| |
Modify attributes
General form:
| |
Example (shell):
| |
Delete user
| |
(List multiple logins to remove several accounts in one call.)
Bulk import from local /etc/passwd (example)
Warning: test on a lab IDM first. UID/GID collisions, weak passwords, and wrong GECOS parsing can cause painful clean-up.
- Prefer SSSD + migration mode or a proper IDM migration plan for production.
- The following only illustrates iterating local users in a four-digit UID range (adjust
awkbounds to match your policy).
| |
Use ipa passwd or force change on first login via password policy after import. Never pipe meaningless data into ipa user-add; authentication must be deliberate.
Operational tips
- Principle of least privilege: grant
adminonly where needed; use roles and member managers for help-desk tasks. - ID ranges: document POSIX UID/GID ranges for IPA, trusts, and manual assigns (
--gidnumber). - Quotes: group names with spaces need shell quoting (
"trust admins"). - Next steps: tie groups to HBAC rules (who may log in where) and sudo rules (what they may run).
Conclusion
With kinit and the ipa CLI you can create POSIX and policy groups, delegate membership with member managers, nest groups, and lifecycle user accounts (password, lock, delete). Pair this workflow with clients enrolled via ipa-client-install, SSSD, and central password policy so Linux hosts honor the same identities you manage in FreeIPA.
If you want a follow-up article on HBAC, sudo, or host enrollment patterns on Rocky/Alma 9, say which scenario you care about first.