
How to Add Users in FreeIPA: A Guide to CLI and Web UI Methods
Managing user accounts is a fundamental task in any identity management system. For organizations leveraging FreeIPA for centralized authentication in Linux environments, understanding how to efficiently add and manage users is critical. FreeIPA offers two primary methods for user creation: the powerful Command-Line Interface (CLI) for automation and speed, and the intuitive Web UI for visual management.
This guide will walk you through both methods, helping you choose the best approach for your workflow while highlighting key security best practices.
Creating FreeIPA Users via the Command Line (CLI)
For system administrators who live in the terminal, the CLI is the most efficient way to manage FreeIPA. It’s scriptable, fast, and provides granular control over user attributes.
Step 1: Authenticate with Kerberos
Before you can make changes, you must obtain a valid Kerberos ticket for an administrative user. This ensures you have the necessary permissions to create new accounts.
kinit admin
You will be prompted to enter the password for your admin user.
Step 2: Add the User with ipa user-add
The core command for creating a new user is ipa user-add. At a minimum, you must provide a username, first name, and last name.
The basic command structure is:
ipa user-add USERNAME --first=FIRSTNAME --last=LASTNAME
For example, to create a user named Jane Doe with the username jdoe, you would run:
ipa user-add jdoe --first=Jane --last=Doe
This command creates the user with default settings. You can add many other attributes directly during creation, such as an email address, login shell, or home directory.
ipa user-add jdoe --first=Jane --last=Doe [email protected] --shell=/bin/bash
Step 3: Set the Initial Password
A newly created user does not have a password. You must set one using the ipa passwd command.
ipa passwd jdoe
You will be prompted to enter and confirm a new password for the user. For security, FreeIPA will automatically require the user to change this temporary password upon their first login.
Adding Users Through the FreeIPA Web Interface
The FreeIPA Web UI provides a user-friendly, graphical method for managing users. This is an excellent option for those who prefer a visual interface or for performing one-off administrative tasks.
Step-by-Step Guide to Using the Web UI:
Log In: Navigate to your FreeIPA server’s web address (e.g.,
https://ipa.example.com/) and log in with your administrative credentials.Navigate to the Users Section: On the main dashboard, click on the Identity tab in the top navigation bar, and then select Users from the dropdown or sidebar menu.
Initiate User Creation: In the Users panel, click the + Add button located near the top of the user list.
Fill in User Details: An “Add User” form will appear. You must fill in the required fields:
- User login: The username (e.g.,
jdoe). - First name: The user’s first name.
- Last name: The user’s last name.
- User login: The username (e.g.,
Set the Initial Password: In the “Password” field, enter a temporary password for the user. You will need to confirm it in the “Password (confirm)” field.
Enforce Security: Crucially, ensure the “Force password change on next login” checkbox is ticked. This is a vital security measure that compels the user to set their own private password immediately.
Save the User: After filling in the details, click the Add button at the top of the form to create the account.
How to Verify a New User Account
Whether you used the CLI or the Web UI, it’s always a good practice to verify that the user was created successfully.
Using the CLI: The
ipa user-showcommand provides a detailed summary of a user account.ipa user-show jdoeThis will display all the user’s attributes, confirming their existence and configuration.
Using the Web UI: Simply search for the new username in the search bar within the Identity -> Users section. The user should appear in the list. Clicking on their name will show you all their associated details.
Best Practices for FreeIPA User Management
Creating users is just the beginning. To maintain a secure and organized system, follow these essential best practices:
- Enforce Strong Password Policies: Use FreeIPA’s built-in policy settings to enforce password complexity, history, and minimum length requirements.
- Use Groups for Permissions: Avoid assigning permissions directly to individual users. Instead, create groups (e.g.,
developers,sysadmins,auditors), assign permissions to those groups, and then add users to the appropriate groups. This makes managing access rights far more scalable and less prone to error. - Leverage Host-Based Access Control (HBAC): Don’t just control who can log in, but also where they can log in from. HBAC rules allow you to define which users can access which servers, significantly enhancing your security posture.
- Regularly Audit Accounts: Periodically review your user list to identify and disable or remove accounts that are no longer needed. Stale accounts are a common security risk.
Source: https://kifarunix.com/add-freeipa-user-accounts-via-cli-or-web-interface/


