Product SiteDocumentation Site

Red Hat Enterprise Linux 6.2

Identity Management Guide

Managing Identity and Authorization Policies for Linux-Based Infrastructures

Edition 2.1.4

Ella Deon Lackey


Legal Notice

Copyright © 2011 Red Hat.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
All other trademarks are the property of their respective owners.


1801 Varsity Drive
RaleighNC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701

Abstract
Identity and policy management — for both users and machines — is a core function for almost any enterprise environment. IPA provides a way to create an identity domain that allows machines to enroll to a domain and immediately access identity information required for single sign-on and authentication services, as well as policy settings that govern authorization and access. This manual covers all aspects of installing, configuring, and managing IPA domains, including both servers and clients. This guide is intended for IT and systems administrators.

Preface
1. Audience and Purpose
2. Examples and Formatting
2.1. Brackets
2.2. Client Tool Information
2.3. Text Formatting and Styles
3. Giving Feedback
4. Document Change History
Release Information
1. Known Issues
1. Introduction to Identity Management
1.1. IPA v. LDAP: A More Focused Type of Service
1.1.1. A Working Definition for Identity Management
1.1.2. Contrasting Identity Management with a Standard LDAP Directory
1.2. Bringing Linux Services Together
1.2.1. Authentication: Kerberos KDC
1.2.2. Data Storage: 389 Directory Server
1.2.3. Authentication: Dogtag Certificate System
1.2.4. Server/Client Discovery: DNS
1.2.5. Management: NTP
1.3. Relationships Between Servers and Clients
1.3.1. About IPA Servers and Replicas
1.3.2. About IPA Clients
2. Installing an IPA Server
2.1. Supported Server Platforms
2.2. Preparing to Install the IPA Server
2.2.1. Hardware Requirements
2.2.2. Software Requirements
2.2.3. Supported Web Browsers
2.2.4. System Prerequisites
2.2.4.1. Hostname Requirements
2.2.4.2. Directory Server
2.2.4.3. System Files
2.2.4.4. System Ports
2.2.4.5. NTP
2.2.4.6. DNS
2.2.4.7. Networking
2.3. Installing the IPA Server Packages
2.4. Creating an IPA Server Instance
2.4.1. About ipa-server-install
2.4.2. Setting up an IPA Server: Basic Interactive Installation
2.4.3. Examples of Creating the IPA Server
2.4.3.1. Non-Interactive Basic Installation
2.4.3.2. Using Different CA Configurations
2.4.3.3. Using DNS
2.4.4. Troubleshooting Installation Problems
2.5. Setting up IPA Replicas
2.5.1. Prepping and Installing the Replica Server
2.5.2. Creating the Replica
2.5.3. Troubleshooting Replica Installation
2.6. Uninstalling IPA Servers and Replicas
3. Setting up Systems as IPA Clients
3.1. What Happens in Client Setup
3.2. Supported Platforms for IPA Clients
3.3. Configuring a Red Hat Enterprise Linux System as an IPA Client
3.4. Manually Configuring a Linux Client
3.5. Configuring a Solaris System as an IPA Client
3.5.1. Configuring Solaris 10
3.5.2. Configuring Solaris 9
3.6. Configuring an HP-UX System as an IPA Client
3.6.1. Configuring NTP
3.6.2. Configuring LDAP Authentication
3.6.3. Configuring Kerberos
3.6.4. Configuring PAM
3.6.4.1. HP-UX 11i v2
3.6.4.2. HP-UX 11i v1
3.6.5. Configuring SSH
3.6.6. Configuring Access Control
3.6.7. Testing the Configuration
3.7. Configuring an AIX System as an IPA Client
3.7.1. Prerequisites
3.7.2. Configuring the AIX Client
3.8. Troubleshooting Client Installations
3.9. Uninstalling an IPA Client
4. Basic Usage
4.1. About the IPA Client Tools
4.1.1. About the IPA Command-Line Tools
4.1.1.1. ipa and Other Command-Line Scripts
4.1.1.2. Adding Attributes with --setattr and --addattr
4.1.1.3. Tips for Running IPA Tools
4.1.2. Looking at the IPA UI
4.1.2.1. The UI Layout
4.1.2.2. Page Elements
4.1.2.3. Showing and Changing Group Members
4.1.2.4. Looking at Search Results
4.2. Logging into IPA
4.2.1. Logging into IPA
4.2.2. Logging in When an IPA User Is Different Than the System User
4.2.3. Checking the Current Logged in User
4.2.4. Caching User Kerberos Tickets
4.3. Using the IPA Web UI
4.3.1. Supported Web Browsers
4.3.2. Opening the IPA Web UI
4.3.3. Configuring the Browser
4.3.4. Using a Browser on Another System
4.3.5. Enabling Username/Password Authentication in Your Browser
4.3.6. Using the UI with Proxy Servers
4.3.7. Troubleshooting UI Connection Problems
5. Identity: Managing Users and User Groups
5.1. Setting up User Home Directories
5.1.1. About Home Directories
5.1.2. Enabling the PAM Home Directory Module
5.1.3. Manually Automounting Home Directories
5.2. Managing User Accounts
5.2.1. About User Entries
5.2.1.1. About User Schema
5.2.1.2. About Username Formats
5.2.1.3. About Changing the Default User and Group Schema
5.2.1.4. Applying Custom Object Classes to New User Entries
5.2.1.5. Applying Custom Object Classes to New Group Entries
5.2.2. Adding Users
5.2.2.1. From the Web UI
5.2.2.2. From the Command Line
5.2.3. Editing Users
5.2.3.1. From the Web UI
5.2.3.2. From the Command Line
5.2.4. Activating and Deactivating User Accounts
5.2.4.1. From the Web UI
5.2.4.2. From the Command Line
5.2.5. Deleting Users
5.2.5.1. With the Web UI
5.2.5.2. From the Command Line
5.3. Changing Passwords
5.3.1. From the Web UI
5.3.2. From the Command Line
5.4. Managing Unique UID and GID Number Assignments
5.4.1. About ID Range Assignments During Installation
5.4.2. Adding New Ranges
5.5. Managing User Groups
5.5.1. Creating User Groups
5.5.1.1. With the Web UI
5.5.1.2. With the Command Line
5.5.2. Adding Group Members
5.5.2.1. With the Web UI (Group Page)
5.5.2.2. With the Web UI (User's Page)
5.5.2.3. With the Command Line
5.5.2.4. Viewing Direct and Indirect Members of a Group
5.5.3. Deleting User Groups
5.5.3.1. With the Web UI
5.5.3.2. With the Command Line
5.6. Searching for Users and Groups
5.6.1. With the UI
5.6.2. With the Command Line
5.7. Specifying Default User and Group Settings
5.7.1. Viewing the Settings Configuration
5.7.1.1. From the Web UI
5.7.1.2. From the Command Line
5.7.2. Setting Default Search Limits
5.7.2.1. With the Web UI
5.7.2.2. With the Command Line
5.7.3. Setting User Search Attributes
5.7.3.1. From the Web UI
5.7.3.2. From the Web UI
5.7.4. Setting Group Search Attributes
5.7.4.1. From the Web UI
5.7.4.2. From the Command Line
6. Identity: Managing Hosts and Services
6.1. About Hosts, Services, and Machine Identity and Authentication
6.2. Adding Host Entries
6.2.1. Adding Host Entries from the Web UI
6.2.2. Adding Host Entries from the Command Line
6.3. Enrolling Clients Manually
6.3.1. Performing a Split Enrollment
6.3.2. Performing a Bulk or Kickstart Enrollment
6.4. Manually Unconfiguring Client Machines
6.5. Managing Services
6.5.1. Adding and Editing Service Entries and Keytabs
6.5.1.1. Adding Services and Keytabs from the Web UI
6.5.1.2. Adding Services and Keytabs from the Command Line
6.5.2. Adding Services and Certificates for Services
6.5.2.1. Adding Services and Certificates from the Web UI
6.5.2.2. Adding Services and Certificates from the Command Line
6.5.3. Storing Certificates in NSS Databases
6.5.4. Configuring Clustered Services
6.5.5. Using the Same Service Principal for Multiple Services
6.6. Disabling Host and Service Entries
6.7. Extending Access Permissions over Other Hosts and Services
6.7.1. Delegating Service Management
6.7.2. Delegating Host Management
6.7.3. Accessing Delegated Services
6.8. Renaming Machines and Reconfiguring IPA Client Configuration
6.9. Managing Host Groups
6.9.1. Creating Host Groups
6.9.1.1. Creating Host Groups from the Web UI
6.9.1.2. Creating Host Groups from the Command Line
6.9.2. Adding Group Members
6.9.2.1. Adding Group Members from the Web UI
6.9.2.2. Adding Group Members from the Command Line
6.10. Troubleshooting Host Problems
6.10.1. Certificate Not Found/Serial Number Not Found Errors
6.10.2. Debugging Client Connection Problems
7. Identity: Integrating with Microsoft Active Directory
7.1. About Active Directory and Identity Management
7.1.1. About Active Directory Synchronization
7.1.2. Attributes Which Are Synchronized
7.1.3. User Schema Differences between Identity Management and Active Directory
7.1.3.1. Values for cn Attributes
7.1.3.2. Values for street and streetAddress
7.1.3.3. Constraints on the initials Attribute
7.2. Setting up Active Directory for Synchronization
7.3. Managing Synchronization Agreements
7.3.1. Trusting the Active Directory and IPA CA Certificates
7.3.2. Creating Synchronization Agreements
7.3.3. Changing the Behavior for Syncing User Account Attributes
7.3.4. Changing the Synchronized Windows Subtree
7.3.5. Deleting Synchronization Agreements
7.3.6. Winsync Agreement Failures
7.4. Managing Password Synchronization
7.4.1. Setting up the Windows Server for Password Synchronization
7.4.2. Setting up Password Synchronization
7.4.3. Exempting Active Directory Users from Password Synchronization
8. Identity: Managing DNS
8.1. About DNS in IPA
8.2. Configuring DNS in Identity Management
8.3. Configuring the bind-dyndb-ldap Plug-in
8.4. Changing Recursive Queries Against Forwarders
8.5. Adding DNS Zones
8.5.1. Adding DNS Zones from the Web UI
8.5.2. Adding DNS Zones from the Command Line
8.6. Modifying DNS Zones
8.6.1. Editing the Zone Configuration in the Web UI
8.6.2. Editing the Zone Configuration in the Command Line
8.7. Enabling Dynamic DNS Updates
8.7.1. Enabling Dynamic DNS Updates in the Web UI
8.7.2. Enabling Dynamic DNS Updates in the Command Line
8.8. Enabling and Disabling Zones
8.8.1. Disabling Zones in the Web UI
8.8.2. Disabling Zones in the Command Line
8.9. Adding Records to DNS Zones
8.9.1. Adding DNS Resource Records from the Web UI
8.9.2. Adding DNS Resource Records from the Command Line
8.10. Deleting Records from DNS Zones
8.10.1. Deleting Records with the Web UI
8.10.2. Deleting Records with the Command Line
8.11. Resolving Hostnames in the IPA Domain
8.12. Changing Load Balancing for IPA Servers and Replicas
9. Policy: Using Automount
9.1. About Automount and IPA
9.2. Configuring Automount
9.2.1. Configuring autofs on Red Hat Enterprise Linux
9.2.2. Configuring Automount on Solaris
9.3. Setting up a Kerberized NFS Server
9.3.1. Setting up a Kerberized NFS Server
9.3.2. Setting up a Kerberized NFS Client
9.4. Configuring Locations
9.4.1. Configuring Locations through the Web UI
9.4.2. Configuring Locations through the Command Line
9.5. Configuring Maps
9.5.1. Configuring Direct Maps
9.5.1.1. Configuring Direct Maps from the Web UI
9.5.1.2. Configuring Direct Maps from the Command Line
9.5.2. Configuring Indirect Maps
9.5.2.1. Configuring Indirect Maps from the Web UI
9.5.2.2. Configuring Indirect Maps from the Command Line
9.5.3. Importing Automount Maps
10. Policy: Integrating with NIS Domains and Netgroups
10.1. About NIS and Identity Management
10.2. Creating Netgroups
10.2.1. Adding Netgroups
10.2.1.1. With the Web UI
10.2.1.2. With the Command Line
10.2.2. Adding Netgroup Members
10.2.2.1. With the Web UI
10.2.2.2. With the Command Line
10.3. Exposing Automount Maps to NIS Clients
10.4. Migrating from NIS to IPA
10.4.1. Preparing Netgroup Entries in IPA
10.4.2. Enabling the NIS Listener in Identity Management
10.4.3. Exporting the Existing NIS Data
11. Policy: Defining Password Policies
11.1. About Password Policies and Policy Attributes
11.2. Viewing Password Policies
11.2.1. Viewing the Global Password Policy
11.2.1.1. With the Web UI
11.2.1.2. With the Command Line
11.2.2. Viewing Group-Level Password Policies
11.2.2.1. With the Web UI
11.2.2.2. With the Command Line
11.2.3. Viewing the Password Policy in Effect for a User
11.3. Editing the Global Password Policy
11.3.1. With the UI
11.3.2. With the Command Line
11.4. Creating Group-Level Password Policies
11.4.1. With the Web UI
11.4.2. With the Command Line
11.5. Changing the Priority of Group Password Policies
11.6. Setting Account Lockout Policies
11.7. Enabling a Password Change Dialog
12. Policy: Managing the Kerberos Domain
12.1. About Kerberos
12.1.1. About Principal Names
12.1.2. About Protecting Keytabs
12.2. Setting Kerberos Ticket Policies
12.2.1. Setting Global Ticket Policies
12.2.1.1. From the Web UI
12.2.1.2. From the Command Line
12.2.2. Setting User-Level Ticket Policies
12.3. Refreshing Kerberos Tickets
12.4. Caching Kerberos Passwords
12.5. Removing Keytabs
12.6. Troubleshooting Kerberos Errors
13. Policy: Using sudo
13.1. About sudo and IPA
13.1.1. General sudo Configuration in Identity Management
13.1.2. sudo and Netgroups
13.1.3. Supported sudo Clients
13.2. Setting up sudo Commands and Command Groups
13.2.1. Adding sudo Commands
13.2.1.1. Adding sudo Commands with the Web UI
13.2.1.2. Adding sudo Commands with the Command Line
13.2.2. Adding sudo Command Groups
13.2.2.1. Adding sudo Command Groups with the Web UI
13.2.2.2. Adding sudo Command Groups with the Command Line
13.3. Defining sudo Rules
13.3.1. Defining sudo Rules in the Web UI
13.3.2. Defining sudo Rules in the Command Line
13.4. An Example of Configuring sudo
13.4.1. Server Configuration for sudo Rules
13.4.2. Client Configuration for sudo Rules
14. Policy: Configuring Host-Based Access Control
14.1. About Host-Based Access Control
14.2. Creating Host-Based Access Control Entries for Services and Service Groups
14.2.1. Adding HBAC Services
14.2.1.1. Adding HBAC Services in the Web UI
14.2.1.2. Adding Services in the Command Line
14.2.2. Adding Service Groups
14.2.2.1. Adding Service Groups in the Web UI
14.2.2.2. Adding Service Groups in the Command Line
14.3. Defining Host-Based Access Control Rules
14.3.1. Setting Host-Based Access Control Rules in the Web UI
14.3.2. Setting Host-Based Access Control Rules in the Command Line
14.4. Testing Host-Based Access Control Rules
14.4.1. The Limits of Host-Based Access Control Configuration
14.4.2. Test Scenarios for Host-Based Access Control
15. Configuration: Defining Access Control within IPA
15.1. About Access Controls for IPA Entries
15.1.1. A Brief Look at Access Control Concepts
15.1.2. Access Control Methods in Identity Management
15.2. Defining Self-Service Settings
15.2.1. Creating Self-Service Rules from the Web UI
15.2.2. Creating Self-Service Rules from the Command Line
15.2.3. Editing Self-Service Rules
15.3. Delegating Permissions over Users
15.3.1. Delegating Access to User Groups in the Web UI
15.3.2. Delegating Access to User Groups in the Command Line
15.4. Defining Role-Based Access Controls
15.4.1. Creating Roles
15.4.1.1. Creating Roles in the Web UI
15.4.1.2. Creating Roles in the Command Line
15.4.2. Creating New Permissions
15.4.2.1. Creating New Permissions from the Web UI
15.4.2.2. Creating New Permissions from the Command Line
15.4.3. Creating New Privileges
15.4.3.1. Creating New Privileges from the Web UI
15.4.3.2. Creating New Privileges from the Command Line
16. Configuring the IPA Server
16.1. Identity Management Files and Logs
16.1.1. A Reference of IPA Server Configuration Files and Directories
16.1.2. About default.conf and Context Configuration Files
16.1.3. Checking IPA Server Logs
16.1.3.1. Enabling Server Debug Logging
16.1.3.2. Debugging Command-Line Operations
16.2. Disabling Anonymous Binds
16.3. Configuring Alternate Certificate Authorities
16.4. Configuring CRLs and OCSP Responders
16.4.1. Using an OSCP Responder with SELinux
16.4.2. Changing the CRL Update Interval
16.4.3. Changing the OCSP Responder Location
16.5. Setting an IPA Server as an Apache Virtual Host
16.6. Setting DNS Entries for Multi-Homed Servers
16.7. Managing Replication Agreements Between IPA Servers
16.7.1. Listing Replication Agreements
16.7.2. Creating and Removing Replication Agreements
16.7.3. Forcing Replication
16.7.4. Reinitializing IPA Servers
16.8. Promoting a Replica to an IPA Server
16.8.1. Promoting a Replica with a Dogtag Certificate System CA
16.8.2. Promoting a Replica with a Self-Signed CA
16.9. Testing Before Upgrading the IPA Server
17. Migrating from an LDAP Directory to IPA
17.1. An Overview of LDAP to IPA Migration
17.1.1. Planning the Client Configuration
17.1.1.1. Initial Client Configuration (Pre-Migration)
17.1.1.2. Recommended Configuration for Red Hat Enterprise Linux Clients
17.1.1.3. Alternative Supported Configuration
17.1.2. Planning Password Migration
17.1.3. Migration Considerations and Requirements
17.1.3.1. LDAP Servers Supported for Migration
17.1.3.2. Migration Environment Requirements
17.1.3.3. Migration Tools
17.1.3.4. Migration Sequence
17.2. Scenario 1: Using SSSD as Part of Migration
17.3. Scenario 2: Migrating an LDAP Server Directly to Identity Management
18. Working with certmonger
18.1. Requesting a Certificate with certmonger
18.2. Storing Certificates in NSS Databases
18.3. Tracking Certificates with certmonger
A. Frequently Asked Questions
B. IPA Tools Reference
B.1. Using Special Characters
B.2. ipa
B.2.1. Location
B.2.2. Syntax
B.2.3. Help Topics
B.2.4. Global Options
B.2.5. Adding Attributes with --setattr and --addattr
B.2.6. Return Codes
B.2.7. Commands
B.3. ipa DNS Commands
B.3.1. ipa dnszone-add
B.3.1.1. Syntax
B.3.1.2. Options
B.4. ipa Host Commands
B.4.1. ipa host-add
B.4.1.1. Syntax
B.4.1.2. Options
B.5. Server Scripts
B.5.1. ipa-replica-install
B.5.1.1. Location
B.5.1.2. Syntax
B.5.1.3. Options
B.5.2. ipa-replica-prepare
B.5.2.1. Location
B.5.2.2. Syntax
B.5.2.3. Options
B.5.3. ipa-server-install
B.5.3.1. Location
B.5.3.2. Syntax
B.5.3.3. Options
B.6. Client Scripts
B.6.1. ipa-client-install
B.6.1.1. Location
B.6.1.2. Syntax
B.6.1.3. Options
Glossary
Index

Preface

Identity Management is a Red Hat Enterprise Linux-based way to create a security, identity, and authentication domain. The different security and authentication protocols available to Linux and Unix systems (like Kerberos, NIS, DNS, PAM, and sudo) are complex, unrelated, and difficult to manage coherently, especially when combined with different identity stores.
Identity Management provides a layer that unifies all of these disparate services and simplifies the administrative tasks for managing users, systems, and security. IPA breaks management down into two categories: identity and policy. It centralizes the functions of managing the users and entities within your IT environment (identity) and then provides a framework to define authentication and authorization for a global security framework and user-friendly tools like single sign-on (policy).

1. Audience and Purpose

With Identity Management, a Red Hat Enterprise Linux system can easily become the center of an identity/authentication domain and even provide access to the domain for clients of other operating systems. IPA is an integrated system, that builds on existing and reliable technologies like LDAP and certificate protocols, with a robust yet straightforward set of tools (including a web-based UI). The key to identity/policy management with IPA is simplicity and flexibility:
  • Centralized identity stores for authentication and single sign-on using both integrated LDAP services (with 389 Directory Server) and, optionally, NIS services
  • Clear and manageable administrative control over system services like PAM, NTP, and sudo
  • Simplified DNS domains and maintenance
  • Scalable Kerberos realms and cross-realms which clients can easily join
This guide is written for systems administrators and IT staff who will manage IPA domains, user systems, and servers. This assumes a moderate knowledge of Linux-based systems administration and familiarity with important concepts like access control, LDAP, and Kerberos.
This guide covers every aspect of using IPA, including preparation and installation processes, administrative tasks, and the IPA tools. This guide also explains the major concepts behind both identity and policy management, generally, and IPA features specifically. Administrative tasks in this guide are categorized as either Identity or Policy in the chapter title to help characterize the administrative functions.

2. Examples and Formatting

Each of the examples used in this guide, such as file locations and commands, have certain defined conventions.

2.1. Brackets

Square brackets ([]) are used to indicate an alternative element in a name. For example, if a tool is available in /usr/lib on 32-bit systems and in /usr/lib64 on 64-bit systems, then the tool location may be represented as /usr/lib[64].

2.2. Client Tool Information

The tools for IPA are located in the /usr/bin and the /usr/sbin directories.
The LDAP tools used to edit the IPA directory services, such as ldapmodify and ldapsearch, are from OpenLDAP. OpenLDAP tools use SASL connections by default. To perform a simple bind using a username and password, use the -x argument to disable SASL.

2.3. Text Formatting and Styles

Certain words are represented in different fonts, styles, and weights. Different character formatting is used to indicate the function or purpose of the phrase being highlighted.
Formatting Style Purpose
Monospace with a background
This type of formatting is used for anything entered or returned in a command prompt.
Italicized text Any text which is italicized is a variable, such as instance_name or hostname. Occasionally, this is also used to emphasize a new term or other phrase.
Bolded text Most phrases which are in bold are application names, such as Cygwin, or are fields or options in a user interface, such as a User Name Here: field or Save button. This can also indicate a file, package, or directory name, such as /usr/sbin.
Other formatting styles draw attention to important text.

NOTE

A note provides additional information that can help illustrate the behavior of the system or provide more detail for a specific issue.

IMPORTANT

Important information is necessary, but possibly unexpected, such as a configuration change that will not persist after a reboot.

WARNING

A warning indicates potential data loss, as may happen when tuning hardware for maximum performance.

3. Giving Feedback

If there is any error in this book or there is any way to improve the documentation, please let us know. Bugs can be filed against the documentation for IPA through Bugzilla, http://bugzilla.redhat.com/bugzilla. Make the bug report as specific as possible, so we can be more effective in correcting any issues:
  1. Select the Red Hat group and the Red Hat Enterprise Linux 6 product.
  2. Set the component to doc-Enterprise_Identity_Management_Guide.
  3. For errors, give the page number (for the PDF) or URL (for the HTML), and give a succinct description of the problem, such as incorrect procedure or typo.
    For enhancements, put in what information needs to be added and why.
  4. Give a clear title for the bug. For example, "Incorrect command example for setup script options" is better than "Bad example".
We appreciate receiving any feedback — requests for new sections, corrections, improvements, enhancements, even new ways of delivering the documentation or new styles of docs. You are welcome to contact Red Hat Content Services directly at docs@redhat.com.

4. Document Change History

Revision History
Revision 6.2-8December 16, 2011Ella Deon Lackey
Fixing sudoers_debug example in sudo client configuration procedure, Bugzilla #768792.
Fixing migration command example, Bugzilla #766089.
Revision 6.2-7December 6, 2011Ella Deon Lackey
Release for GA of Red Hat Enterprise Linux 6.2.

Release Information

Identity Management is part of Red Hat Enterprise Linux 6, so major features, known issues, and bug fixes are covered in the Red Hat Enterprise Linux release notes. This section is provided as a convenient reference for significant issues that are in Identity Management 2.1. The full list of known issues related to Identity Management is in the Red Hat Enterprise Linux 6.2 Technical Notes.

1. Known Issues

  • It is not possible to change the uidNumber or gidNumber of a user when using SSSD. SSSD caches the authentication information; when the user is deleted and re-added with a new uidNumber number, then SSSD attempts to reuse the cached object for the new user, which fails wit this error:
    Cache file [/tmp/krb5cc_1866400007_wPJrHJ] exists, but is owned by [1866400007] instead of [1866400008].
  • SSSD does not support the LDAP password expiration controls, so it does not support password expiration notifications or warnings. The 389 Directory Server instance used by Identity Management does support these controls.
  • In the directory, calling hash_create() with an initial table size of 65536 will corrupt memory. With the default parameters, the corruption can occur if the initial table size larger than 1024.
  • The way that Active Directory performs referrals is different than the way that the OpenLDAP libraries (used by the 389 Directory Server instance in Identity Management) performs referrals. Intermittently, Active Directory may return a referral during an LDAP bind attempt that is denied by the OpenLDAP libraries. This can cause performance problems, information loss, or for SSD to go offline.
    To work around this, set this parameter in sssd.conf:
    ldap_referrals = False
    This disables referral chasing in SSSD.
  • SSSD does not support the LDAP password expiration controls, so it does not support password expiration notifications or warnings. The 389 Directory Server instance used by Identity Management does support these controls.
  • When updating the list of object classes for a user or group entry, it is possible to delete object classes which are required by IPA. The UI and CLI do not prevent the required object classes from being deleted, but adding a user or group after the change will fail with object class violations.
  • The previous and next buttons are not displayed in the UI if the number of entries returned is larger than the configured size limit.
    To work around this, you can reasonable increase the number of entries displayed in a search. This is described in Section 5.7.2, “Setting Default Search Limits”.
  • When an IPA server is installed with a custom hostname that is not resolvable, the ipa-server-install command should add a record to the static hostname lookup table in /etc/hosts and enable further configuration of Identity Management integrated services. However, a record is not added to /etc/hosts when an IP address is passed as an CLI option and not interactively. Consequently, IPA server installation fails because integrated services that are being configured expect the IPA server hostname to be resolvable.
    There are two ways to work around this issue:
    • Run the ipa-server-install without the --ip-address option and pass the IP address interactively.
    • Add a record to /etc/hosts before the installation is started. The record should contain the Identity Management server IP address and its full hostname (the hosts(5) man page specifies the record format).
  • Searches can be performed on attributes that are not displayed in the UI. This means that entries can be returned in a search that do not appear to match the given filter. This is especially common if the search information is very short, which increases the likelihood of a match.
    For more information on setting and changing attributes which are searched, see Section 5.7.3, “Setting User Search Attributes” and Section 5.7.4, “Setting Group Search Attributes”.
  • On the configuration page of the Identity Management WebUI, if the User search field is left blank, and the search button is clicked, an internal error is returned.
  • The IPA information is stored in a separate LDAP directory than the certificate information, and these two LDAP databases are replicated separately. It is possible for a replication agreement to be broken for one directory and working for another, which can cause problems with managing clients.
    For example, an IPA server and replica have a function replication agreement between their IPA databases, but the replication agreement between their CA databases is broken. If a host is created on the server, the host entry is replicated over to the replica — but the certificate for that host is not replicated. The replica is aware of the client, but any management operations for that client will fail because the replica doesn't have a copy of its certificate.
    The CA replication agreement can be recreated using the ipa-csreplica-manage utility.
  • Installing the IPA client fails if the 32-bit packages are installed on a 64-bit system because equired NSS dependencies are not installed.
  • If any previous version of Red Hat Enterprise IPA or the Identity Management tech preview are installed, they must be uninstalled before the latest version of Identity Management can be installed and configured. Otherwise, there are problems connecting to the Identity Management LDAP server.
  • It should be possible to reconnect a replica to a master IPA server (meaning, to create a new replication agreement), using the ipa-replica-manage connect command. However, once a connection between a replica and server is deleted using ipa-replica-manage del, a new connection cannot be created. It fails with this error:
    unexpected error: list index out of range
  • When a replica is uninstalled, the ipa-replica-manage list command still lists the replica as being in the server topology.
  • The ipa-replica-manage script manages both replication agreements betweenn IPA servers and synchronization agreements between an IPA server and an Active Directory server.
    The force-sync, del, and re-initialize subcommands with ipa-replica-manage do not work when managing sync agreements, so these operations fail when run against an Active Directory server.
  • The uidNumber and gidNumber attributes on Active Directory user entries are not synced over to IPA.
  • The IPA server cannot be installed on a machine with a dual NIC. When two DNS A records exist for the same hostname, the installer fails with this error:
    Server host name [server1.example.com]: 
    
    Warning: skipping DNS resolution of host server1.example.com
    The domain name has been calculated based on the host name.
    
    Please confirm the domain name [example]: 
    
    Unable to resolve IP address for host name
    Please provide the IP address to be used for this host name:

Chapter 1. Introduction to Identity Management

Red Hat Identity Management is a way to create identity stores, centralized authentication, domain control for Kerberos and DNS services, and authorization policies — all on Linux systems, using native Linux tools. While centralized identity/policy/authorization software is hardly new, Identity Management is one of the only options that supports Linux/Unix domains.
Identity Management provides a unifying skin for standards-defined, common network services, including PAM, LDAP, Kerberos, DNS, NTP, and certificate services, and it allows Red Hat Enterprise Linux systems to serve as the domain controllers.
Identity Management defines a domain, with servers and clients who share centrally-managed services, like Kerberos and DNS. This chapter first explains what Identity Management is. This chapter also covers how all of these services work together within the domain and how servers and clients work with each other.

1.1. IPA v. LDAP: A More Focused Type of Service

At the most basic level, Red Hat Identity Management is a domain controller for Linux and Unix machines. Identity Management defines the domain, using controlling servers and enrolled client machines. This provides centralized structure that has previously been unavailable to Linux/Unix environments, and it does it using native Linux applications and protocols.

1.1.1. A Working Definition for Identity Management

Security information frequently relates to identities of users, machines, and services. Once the identity is verified, then access to services and resources can be controlled.
For efficiency, risk management, and ease of administration, IT administrators try to manage identities as centrally as possible and to unite identity management with authentication and authorization policies. Historically, Linux environments have had a very difficult time establishing this centralized management. There are a number of different protocols (such as NIS and Kerberos) which define domains, while other applications store data (such as LDAP) and still others manage access (such as sudo). None of these applications talk to each other or use the same management tools. Every application had to be administered separately and it had to be managed locally. The only way to get a consistent identity policy was to copy configuration files around manually or to try to develop a proprietary application to manage identities and policies.
The goal of Identity Management is to simplify that administrative overhead. Users, machines, services, and polices are all configured in one place, using the same tools. Because IPA creates a domain, multiple machines can all use the same configuration and the same resources simply by joining the domain. Users only have to sign into services once, and administrators only have to manage a single user account.
IPA does three things:
  • Create a Linux-based and Linux-controlled domain. Both IPA servers and IPA clients are Linux or Unix machines. While IPA can synchronize data with an Active Directory domain to allow integration with Windows servers, it is not an administrative tools for Windows machines and it does not support Windows clients. Identity Management is a management tool for Linux domains.
  • Centralize identity management and identity policies.
  • Build on existing, native Linux applications and protocols. While IPA has its own processes and configuration, its underlying technologies are familiar and trusted by Linux administrators and are well established on Linux systems.
In a sense, Identity Management isn't making administrators do something new; it is helping them do it better. There are a few ways to illustrate that.
On one extreme is the low control environment. Little Example Corp. has several Linux and Unix servers, but each one is administered separately. All passwords are kept on the local machine, so there is no central identity or authentication process. Tim the IT Guy just has to manage users on every machine, set authentication and authorization policies separately, and maintain local passwords. With IPA, things come to order. There is a simple way to have central user, password, and policy stores, so Tim the IT Guy only has to maintain the identities on one machine (the IPA server) and users and policies are uniformly applied to all machines. Using host-based access control, delegation, and other rules, he can even set different access levels for laptops and remote users.
In the middle is the medium control environment. Mid-Example Corp. has several Linux and Unix servers, but Bill the IT Guy has tried to maintain a greater degree of control by creating a NIS domain for machines, an LDAP directory for users, and Kerberos for authentication. While his environment is well under control, every application has to be maintained separately, using different tools. He also has to update all of the services manually whenever a new machine is added to his infrastructure or when one is taken offline. In this situation, IPA greatly reduces his administrative overhead because it integrates all of the different applications together seamlessly, using a single and simplified tool set. It also makes it possible for him to implement single sign-on services for all of the machines in his domain.
On the other extreme is the absent control environment. At Big Example Corp., most of the systems are Windows based and are managed in a tightly-knit Active Directory forest. However, development, production, and other teams have many Linux and Unix systems — which are basically excluded from the Windows controlled environment. IPA brings native control to the Linux/Unix servers, using their native tools and applications — something that is not possible in an Active Directory forest. Additionally, because IPA is Windows-aware, data can be synchronized between Active Directory and IPA, preserving a centralized user store.
IPA provides a very simple solution to a very common, very specific problem: identity management.

1.1.2. Contrasting Identity Management with a Standard LDAP Directory

The closest relative to Identity Management is a standard LDAP directory like 389 Directory Server, but there are some intrinsic differences between what they do and what they're intended to do.
First, it helps to understand what a directory service is. A directory service is a collection of software, hardware, and processes that stores information. While directory services can be highly specific (for example, DNS is a directory service because it stores information on hostnames), a generic directory service can store and retrieve any kind of information. LDAP directories like 389 Directory Server are generic directories. They have a flexible schema that supports entries for users, machines, network entities, physical equipment, and buildings, and that schema can be customized to define entries of almost anything. Because of its extensibility, LDAP servers like 389 Directory Server are frequently used as backends that store data for other applications. 389 Directory Server not only contains information, it organizes information. LDAP directories uses a hierarchical structure, a directory tree, that organize entries into root entries (suffixes), intermediate or container entries (subtrees or branches), and leaf entries (the actual data). Directory trees can be very complex, with a lot of branch points, or very simple (flat) with few branch points.
The primary feature of an LDAP directory is its generality. It can be made to fit into a variety of applications.
Identity Management, on the other hand, has a very specific purpose and fits a very specific application. It is not a general LDAP directory, it is not a backend, and it is not a general policy server. It is not generic.
Identity Management focuses on identities (user and machine) and policies that relate to those identities and their interactions. While it uses an LDAP backend to store its data, IPA has a highly-customized and specific set of schema that defines a particular set of identity-related entries and defines them in detail. It has a relatively flat and simple directory tree because it has only a handful of entry types and relationships that are relevant to its purpose. It has rules and limitations on how the IPA server can be deployed because it can only be deployed for a specific purpose: managing identities.
The restrictions on IPA also give it a great deal of administrative simplicity. It has a simple installation process, a unified set of commands, and a clearly defined role in the overall IT infrastructure. An IPA domain is easy to configure, easy to join, and easy to manage, and the functions that it serves — particularly identity/authentication tasks like enterprise-wide single sign-on — are also easier to do with IPA than with a more general-purpose directory service.
Table 1.1. Identity Management Compared to 389 Directory Server
389 Directory Server Identity Management
Use General purpose Single domain, focused on identity management
Flexibility Highly-customizable Limitations to focus on identity and authentication
Schema Default LDAP schema Optimized, special schema for identity management
Directory Tree Standard and flexible hierarchy Flat tree with a fixed hierarchy
Authentication LDAP Kerberos or Kerberos and LDAP
Active Directory Synchronization Bi-directional Unidirectional, Active Directory to Identity Management
Password Policies LDAP-based Kerberos-based
User Tools Java Console and standard LDAP utilities Web-based UI and special Python command-line tools

LDAP directories like 389 Directory Server have flexibility and adaptability which makes them a perfect backend to any number of applications. Its primary purpose is to store and retrieve data efficiently.
IPA fills a very different niche. It is optimized to perform a single task very effectively. It stores user information and authentication and authorization policies, as well as other information related to access, like host information. Its single purpose is to manage identities.

1.2. Bringing Linux Services Together

Identity Management unifies disparate yet related Linux services into a single management environment. From there, it establishes a simple, easy way to bring host machines into the domain of those services.
An IPA server is, at its core, an identity and authentication server. The primary IPA server, essentially a domain controller, uses a Kerberos server and KDC for authentication. An LDAP backend contains all of the domain information, including users, client machines, and domain configuration.
The IPA Server: Unifying Services
Figure 1.1. The IPA Server: Unifying Services

Other services are included to provide support for the core identity/authentication functions. DNS is used for machine discovery and for connecting to other clients in the domain. NTP is used to synchronize all domain clocks so that logging, certificates, and operations can occur as expected. A certificate service provides certificates for Kerberos-aware services. All of these additional services work together under the control of the IPA server.
The IPA server also has a set of tools which are used to manage all of the IPA-associated services. Rather than managing the LDAP server, KDC, or DNS settings individually, using different tools on local machines, IPA has a single management toolset (CLI and web UI) that allows centralized and cohesive administration of the domain.

1.2.1. Authentication: Kerberos KDC

Kerberos is an authentication protocol. Kerberos uses symmetric key cryptography to generate tickets to users. Kerberos-aware services check the ticket cache (a keytab) and authenticate users with valid tickets.
Kerberos authentication is significantly safer than normal password-based authentication because passwords are never sent over the network — even when services are accessed on other machines.
In Identity Management, the Kerberos administration server is set up on the IPA domain controller, and all of the Kerberos data are stored in IPA's backend Directory Server. The Directory Server instance defines and enforces access controls for the Kerberos data.

NOTE

Th IPA Kerberos server is managed through IPA tools instead of Kerberos tools because all of its data are stored in the Directory Server instance. The KDC is unaware of the Directory Server, so managing the KDC with Kerberos tools does not effect the IPA configuration.

1.2.2. Data Storage: 389 Directory Server

Identity Management contains an internal 389 Directory Server instance. All of the Kerberos information, user accounts, groups, services, policy information, DNS zone and host entries, and all other information in IPA is stored in this 389 Directory Server instance.
When multiple servers are configured, they can talk to each other because 389 Directory Server supports multi-master replication. Agreements are automatically configured between the initial server and any additional replicas which are added to the domain.

1.2.3. Authentication: Dogtag Certificate System

Kerberos can use certificates along with keytabs for authentication, and some services require certificates for secure communication. Identity Management includes a certificate authority, through Dogtag Certificate System, with the server. This CA issues certificates to the server, replicas, and hosts and services within the IPA domain.
The CA can be a root CA or it can have its policies defined by another, external CA (so that it is subordinate to that CA). Whether the CA is a root or subordinate CA is determined when the IPA server is set up.

1.2.4. Server/Client Discovery: DNS

Identity Management defines a domain — multiple machines with different users and services, each accessing shared resources and using shared identity, authentication, and policy configuration. The clients need to be able to contact each other, as IPA servers. Additionally, services like Kerberos depend on hostnames to identify their principal identities.
Hostnames are associated with IP address using the Domain Name Service (DNS). DNS maps hostnames to IP addresses and IP addresses to hostnames, providing a resource that clients can use when they need to look up a host. From the time a client is enrolled in the IPA domain, it uses DNS to locate the IPA server and then all of the services and clients within the domain.
Multiple DNS servers are usually configured, each one working as an authoritative resource for machines within a specific domain. Having the IPA server also be a DNS server is optional, but it is strongly recommended. When the IPA server also manages DNS, there is tight integration between the DNS zones and the IPA clients and the DNS configuration can be managed using native IPA tools. Even if an IPA server is a DNS server, other external DNS servers can still be used.

1.2.5. Management: NTP

Many services require that servers and clients have the same system time, within a certain variance. For example, Kerberos tickets use time stamps to determine their validity. If the times between the server and client skew outside the allowed range, then any Kerberos tickets are invalidated.
Clocks are synchronized over a network using Network Time Protocol (NTP). A central server acts as an authoritative clock and all of the clients which reference that NTP server sync their times to match.
When the IPA server is the NTP server for the domain, all times and dates are synchronized before any other operations are performed. This allows all of the date-related services — including password expirations, ticket and certificate expirations, account lockout settings, and entry create dates — to function as expected.
The IPA server, by default, works as the NTP server for the domain. Other NTP servers can also be used for the hosts.

1.3. Relationships Between Servers and Clients

IPA itself defines a domain, a group of machines that have shared configuration, policies, and identity stores. This shared configuration allows the machines (and users) within the domain to be aware of each other and operate together. This awareness can be used to enable cross-platform compatibility, like unifying Windows and Linux systems, or to enable infrastructure-wide single sign-on.

1.3.1. About IPA Servers and Replicas

IPA works by having identified servers which are the master stores of information for user and machine identities and domain-wide policies. These servers also host domain-related services such as Kerberos and DNS. The server essentially is a central repository of identity and policy information. This information is sent routinely to the clients.
Servers can be cloned and their information mirrored onto subordinate IPA servers called replicas. IPA servers are the data masters; replicas contain copies of that information, which is synchronized between the internal 389 Directory Server and Certificate System databases through mutual replication agreements.
Server and Replica Interactions
Figure 1.2. Server and Replica Interactions

Replicas can communicate with clients, the same as servers, so replicas provide a means to balance the loads on servers while using the same domain configuration. This load balancing is done automatically, using the SRV records in DNS. The SRV record priority sets the order that servers and replicas are contacted, while weight distributed the load between servers/replicas with the same priority. The server and replica DNS entries can be edited to change the load balancing, which is covered in Example 8.5, “SRV Record” and Section 8.12, “Changing Load Balancing for IPA Servers and Replicas”.

1.3.2. About IPA Clients

A client is simply any machine which is configured to operate within the IPA domain, using its Kerberos and DNS services, NTP settings, and certificate services. That's an important distinction: a client does not require a daemon or (necessarily) an installed product. It requires only system configurations which direct it to use IPA services.
For Red Hat Enterprise Linux systems, a certain number of platform tools are available for IPA to use, such as SSSD. These are IPA-enabled platform applications, which is simply a way of saying that they are aspects of the underlying platform that work with IPA services. Other tools, like certain PAM and NSS modules and IPA command-line utilities, are provided as IPA-specific packages that must be installed on the machine. These are IPA-related components.
Server and Client Interactions
Figure 1.3. Server and Client Interactions

IPA uses the local storage (cache) on a client to improve performance in a few ways:
  • Store IPA information when the machine is offline.
  • Keep information active beyond its normal timeout period if the client cannot access the central server. The cache is persistent even after rebooting the machine.
  • Reduce the round-trip time of requests by checking information locally before looking at the server.
Information is stored either in an LDB database (similar to LDAP) or the local filesystem (as XML files), depending on the type of information.
  • Identity information (about users, machines, and groups) is stored in the LDB database, which uses the same syntax as an LDAP directory. This identity information is originally stored in the IPA server's 389 Directory Server instance. Because this information changes frequently and is referenced frequently, it is important to be able to call the more current information quickly, which is possible using an LDB database on the client and the Directory Server on the server.
  • Policy information is more static than identity information, and it can include configuration for SELinux or sudo. These policies are set globally on the server and then are propagated to the clients. On the client, the policy information is stored in the filesystem in XML files which can be downloaded and converted into a native file for whatever service is being managed.
A specific set of services on the IPA server interact with a subset of services and modules on the IPA client. A client is any machine (a host) which can retrieve a keytab or certificates from the IPA domain.
Interactions Between IPA Services
Figure 1.4. Interactions Between IPA Services

Figure 1.4, “Interactions Between IPA Services” shows that Red Hat Enterprise Linux uses two native daemons to interact with the IPA server:
  • SSSD provides the user authentication for the machine and enforces host-based access control rules.
  • certmonger monitors and renews the certificates on the client. It can request new certificates for the services on the system, including virtual machines.
When a Red Hat Enterprise Linux client is added to the domain (enrolled), its SSSD and certmonger are configured to connect to the IPA server and the required Kerberos keytab and host certificates are created. (The host certificate is not used directly by IPA; it may be used by other services, such as a web server.)

Chapter 2. Installing an IPA Server

The IPA domain is defined and managed by an IPA server which is essentially a domain controller. There can be multiple domain controllers within a domain for load-balancing and failover tolerance. These additional servers are called replicas of the master IPA server.
Both IPA servers and replicas only run on Red Hat Enterprise Linux systems. For both servers and replicas, the necessary packages must be installed and then the IPA server or replica itself is configured through setup scripts, which configure all of the requisite services.

2.1. Supported Server Platforms

IPA 2.1 is supported on these platforms:
  • Red Hat Enterprise Linux 6 i386
  • Red Hat Enterprise Linux 6 x86_64

2.2. Preparing to Install the IPA Server

Before you install IPA, ensure that the installation environment is suitably configured. You also need to provide certain information during the installation and configuration procedures, including realm names and certain usernames and passwords. This section describes the information that you need to provide.

2.2.1. Hardware Requirements

A basic user entry is about 1 KB in size, as is a simple host entry with a certificate. The structure of the directory tree and the number of indexes in the Directory Server instance can impact the hardware required for the best performance. Table 2.1, “Minimum Hardware Requirements” lists the recommended minimums. For customized systems, additional indexes, or larger user entries, it is more effective to increase the RAM than to increase the disk space because the Directory Server stores much of its data in cache.

TIP

The Directory Server instance used by the IPA server can be tuned to increase performance. For tuning information, see the Directory Server documentation at http://docs.redhat.com/docs/en-US/Red_Hat_Directory_Server/8.2/html/Performance_Tuning_Guide/system-tuning.html.
The system requirements for both 32-bit and 64-bit platforms are the same.
Table 2.1. Minimum Hardware Requirements
Minimum Hardware Requirements 10,000 - 250,000 Entries 250,000 - 1,000,000 Entries Over 1,000,000 Entries
CPU P3; 500MHz
RAM 1 GB 1 GB 1 GB
Disk Space 2 GB 4 GB 8 GB

2.2.2. Software Requirements

Most of the packages that an IPA server depends on are installed as dependencies when the IPA packages are installed. There are some packages, however, which are required before installing the IPA packages:
  • Kerberos 1.9
  • The named and bind-dyndb-ldap packages for DNS

2.2.3. Supported Web Browsers

The only supported browser to access the IPA web UI is Firefox 3.x or 4.x.

2.2.4. System Prerequisites

The IPA server is set up using a configuration script, and this script makes certain assumption about the host system. If the system does not meet these prerequisites, then server configuration may fail.

2.2.4.1. Hostname Requirements

Regardless of whether the DNS is within the IPA server or external, the server host must have DNS properly configured:
  • The hostname must be a fully-qualified domain name. For example, ipaserver.example.com.

    IMPORTANT

    This must be a valid DNS name, which means only numbers, alphabetic characters, and hyphens (-) are allowed. Other characters, like underscores, in the hostname will cause DNS failures.
  • The server's machine name must be set and resolve to its public IP address. The fully-qualified domain name cannot resolve to the loopback address. It must resolve to the machine's public IP address, not to 127.0.0.1. The output of the hostname command cannot be localhost or localhost6.
  • The reverse of the address that the hostname resolves to must match the hostname.
  • The DNS must be correctly configured to resolve forward and reverse addresses. The DNS does not need to be on the same machine as the IPA server, but it does need to be fully functional.
    If you do not have a functional DNS, you can use the --setup-dns option when you install IPA to configure a suitable DNS automatically.
  • The installation process checks that the IPA server name is a DNS A record and that its reverse and forward addresses match. This check is not performed if an IPA DNS server is installed using the --setup-dns option because the script assumes that the IPA server will use itself as a DNS.

2.2.4.2. Directory Server

There must not be any instances of 389 Directory Server installed on the host machine.

2.2.4.3. System Files

The server script overwrites system files to set up the IPA domain. The system should be clean, without custom configuration for services like DNS and Kerberos, before configuring the IPA server.

2.2.4.4. System Ports

IPA uses a number of ports to communicate with its services. These ports, listed in Table 2.2, “IPA Ports”, must be open and available for IPA to work. They cannot be in use by another service or blocked by a firewall. To make sure that these ports are available, try iptables to list the available ports or nc, telnet, or nmap to connect to a port or run a port scan.
To open a port:
# iptables -A INPUT -p tcp --dport 389 -j ACCEPT
The iptables man page has more information on opening and closing ports on a system.
Table 2.2. IPA Ports
Service Ports
HTTP/HTTPS
80
443
LDAP/LDAPS
389
636
Kerberos[a]
88
464
DNS[a] 53
NTP[b] 123
OCSP responder[c] 9180
Dogtag Certificate System
9180 (OCSP responder, non-SSL)
9443 (agents)
9444 (users, SSL)
9445 (administrators)
9446 (users, client authentication)
9701 (Tomcat)
7389 (internal LDAP database)
[a] This service uses both TCP and UDP ports.
[b] This service uses UDP ports only.
[c] This is part of the Dogtag Certificate System server.

2.2.4.5. NTP

If a server is being installed on a virtual machine, that server should not run an NTP server. To disable NTP for IPA, use the --no-ntp option.

2.2.4.6. DNS

IPA uses DNS for the IPA clients to find (discover) the IPA servers. The DNS service can be managed by IPA itself, or IPA can use an existing DNS server. Without a properly configured and working DNS, server discovery for clients and IPA services like, LDAP, Kerberos, and SSL may fail to work.
2.2.4.6.1. The IPA-Generated DNS File
To help create and configure a suitable DNS setup, the IPA installation script creates a sample zone file. During the installation, IPA displays a message similar to the following:
Sample zone file for bind has been created in /tmp/sample.zone.F_uMf4.db
If a DNS server is already configured in the network, then the configuration in the IPA-generated file can be added to the existing DNS zone file. This allows IPA clients to find LDAP and Kerberos servers that are required for them to participate in the IPA domain. For example, this DNS zone configuration is created for an IPA server with the KDC and DNS servers all on the same machine in the EXAMPLE.COM realm:
; ldap servers
_ldap._tcp              IN SRV 0 100 389        ipaserver.example.com

;kerberos realm
_kerberos               IN TXT EXAMPLE.COM

; kerberos servers
_kerberos._tcp          IN SRV 0 100 88         ipaserver.example.com
_kerberos._udp          IN SRV 0 100 88         ipaserver.example.com
_kerberos-master._tcp   IN SRV 0 100 88         ipaserver.example.com
_kerberos-master._udp   IN SRV 0 100 88         ipaserver.example.com
_kpasswd._tcp           IN SRV 0 100 464        ipaserver.example.com
_kpasswd._udp           IN SRV 0 100 464        ipaserver.example.com
2.2.4.6.2. IPA, DNS, and NSCD
It is strongly recommended that you avoid or restrict the use of nscd (Name Service Caching Daemon) in an IPA deployment. The nscd service is extremely useful for reducing the load on the server, and for making clients more responsive, but there can be problems when a system is also using SSSD, which performs its own caching.
nscd caches authentication and identity information for all services that perform queries through nsswitch, including getent. Because nscd performs both positive and negative caching, if a request determines that a specific IPA user does not exist, it marks this as a negative cache. Values stored in the cache remain until the cache expires, regardless of any changes that may occur on the server. The results of such caching is that new users and memberships may not be visible, and users and memberships that have been removed may still be visible.
Avoid clashes with SSSD caches and to prevent locking out users, avoid using nscd altogether. Alternatively, use a shorter cache time by resetting the time-to-live caching values in the /etc/nscd.conf file:
positive-time-to-live   group           3600
negative-time-to-live   group           60
positive-time-to-live   hosts           3600
negative-time-to-live   hosts           20
2.2.4.6.3. DNS and Kerberos
The Kerberos server requires a valid DNS A record, and reverse DNS needs to work correctly. It is safe to use CNAMEs if they point to the A name that corresponds to the principal name used to create service principal names (SPN) for the host. Avoid the use of DDNS names, however.
If necessary, add the hostname to the /etc/hosts file, as long as the fully qualified hostname must be listed first. For example:
192.168.1.1    ipaserver.example.com  ipaserver
The realm name does not have to match any or all of the domain name. For example, the domain name can be example.com and the realm name can be TESTIPA. It is only a convention that they match. IPA adds the appropriate domain to realm mapping in the /etc/krb5.conf file.
A typical resolver looks in the /etc/hosts file first and DNS second. If nscd is running this may also cause issues because it caches lookups. The IPA installer does not kill nscd until after the installation process has started, so there can be cached entries that interfere with any changes to the /etc/hosts. If you need to edit the /etc/hosts file, kill the nscd daemon first.
2.2.4.6.4. IPA DNS and DNS Forwarders
There is an option to configure DNS forwarders as part of the IPA DNS configuration. This is beneficial if there is limited direct access to root name servers, such as an organization's main DNS server or even an external DNS server.
Either interactively or through the install argument, forwarders can be listed as a comma-separated list of IP addresses.

NOTE

DNS forwarders must be specified as IP addresses, not as hostnames.
By default, any host is permitted to issue recursive queries against configured forwarders. The client installation script automatically adds a line to the /etc/named.conf file to allow these recursive queries.
        forward first;
        forwarders { 10.16.36.29; };
        allow-recursion { any; };
This default behavior can be changed by changing the allow-recursion statement. The name server documentation has more details on editing configuration statements.

2.2.4.7. Networking

2.2.4.7.1. Configuring Networking Services
The default networking service used by Red Hat Enterprise Linux is NetworkManager, and due to the way this service works, it can cause problems with IPA and the KDC. Consequently, it is highly recommended that you use the network service to manage the networking requirements in an IPA environment and disable the NetworkManager service.
  1. Boot the machine into single-user mode and run the following commands:
    # chkconfig NetworkManager off; service NetworkManager stop
  2. If NetworkManagerDispatcher is installed, ensure that it is stopped and disabled:
    # chkconfig NetworkManagerDispatcher off; service NetworkManagerDispatcher stop
  3. Then, make sure that the network service is properly started.
    # chkconfig network on; service network start
  4. Ensure that static networking is correctly configured.
  5. Restart the system.
2.2.4.7.2. Configuring the /etc/hosts File
You need to ensure that your /etc/hosts file is configured correctly. A misconfigured file can prevent the IPA command-line tools from functioning correctly and can prevent the IPA web interface from connecting to the IPA server.
Configure the /etc/hosts file to list the FQDN for the IPA server before any aliases. Also ensure that the hostname is not part of the localhost entry. The following is an example of a valid hosts file:
127.0.0.1	localhost.localdomain	localhost
::1		localhost6.localdomain6	localhost6
192.168.1.1	ipaserver.example.com	ipaserver

Important

Do not omit the IPv4 entry in the /etc/hosts file. This entry is required by the IPA web service.

2.3. Installing the IPA Server Packages

Installing only the IPA server requires a single package, ipa-server. If the IPA server will also manage a DNS server, then it requires two additional packages to set up the DNS.
All of these packages can be installed using the yum command:
# yum install ipa-server bind bind-dyndb-ldap
Installing the ipa-server also installs a large number of dependencies, such as 389-ds-base for the LDAP service and krb5-server for the Kerberos service, along with IPA tools.
After the packages are installed, the server instance must be created using the ipa-server-install command. The options for configuring the new server instance are described in Section 2.4, “Creating an IPA Server Instance”.

2.4. Creating an IPA Server Instance

The IPA setup script creates a server instance, which includes configuring all of the required services for the IPA domain:
  • The network time daemon (ntpd)
  • A 389 Directory Server instance
  • A Kerberos key distribution center (KDC)
  • Apache (httpd)
  • An updated SELinux targeted policy
  • The Active Directory WinSync plug-in
  • A certificate authority
  • Optional. A domain name service (DNS) server
The IPA setup process can be minimal, where the administrator only supplies some required information, or it can be very specific, with user-defined settings for many parts of the IPA services. The configuration is passed using arguments with the ipa-install-server script.

NOTE

The port numbers and directory locations used by IPA are all defined automatically, as defined in Section 2.2.4.4, “System Ports” and . These ports and directories cannot be changed or customized.

2.4.1. About ipa-server-install

An IPA server instance is created by running the ipa-server-install script. This script can accept user-defined settings for services, like DNS and Kerberos, that are used by the IPA instance, or it can supply predefined values for minimal input from the administrator.
While ipa-server-install can be run without any options, so that it prompts for the required information, it has numerous arguments which allow the configuration process to be easily scripted or to supply additional information which is not requested during an interactive installation.
Table 2.3, “ipa-server-install Options” lists some common arguments with ipa-server-install, while Section 2.4.3, “Examples of Creating the IPA Server” has examples of some common installation scenarios. The full list of options are in Section B.5.3, “ipa-server-install”. In real life, the ipa-server-install options are versatile enough to be customized to the specific deployment environment.
Table 2.3. ipa-server-install Options
Argument Description
-a ipa_admin_password The password for the IPA administrator. This is used for the admin user to authenticate to the Kerberos realm.
--hostname=hostname The fully-qualified domain name of the IPA server machine.

IMPORTANT

This must be a valid DNS name, which means only numbers, alphabetic characters, and hyphens (-) are allowed. Other characters, like underscores, in the hostname will cause DNS failures.
-n domain_name The name of the LDAP server domain to use for the IPA domain. This is usually based on the IPA server's hostname.
-p directory_manager_password The password for the superuser, cn=Directory Manager, for the LDAP service.
-r realm_name The name of the Kerberos realm to create for the IPA domain.
--subject=subject_DN Sets the base element for the subject DN of the issued certificates. This defaults to O=realm.
--forwarder=forwarder Gives a DNS forwarder to use with the DNS service. To specify more than one forwarder, use this option multiple times.
--no-forwarders Uses root servers with the DNS service instead of forwarders.
--no-reverse Does not create a reverse DNS zone when the DNS domain is set up.
--setup-dns Tells the installation script to set up a DNS service within the IPA domain. Using an integrated DNS service is optional, so if this option is not passed with the installation script, then no DNS is configured.
--idmax=number Sets the upper bound for IDs which can be assigned by the IPA server. The default value is the ID start value plus 199999.
--idstart=number Sets the lower bound (starting value) for IDs which can be assigned by the IPA server. The default value is randomly selected.

2.4.2. Setting up an IPA Server: Basic Interactive Installation

All that is required to set up an IPA server is to run the ipa-server-install script. This launches the script interactively, which prompts for the required information to set up a server, but without more advanced configuration like DNS and CA options.
  1. Run the ipa-server-install script.
    # ipa-server-install
  2. Enter the hostname. This is determined automatically using reverse DNS.
    Server host name [ipaserver.example.com]:
  3. Enter the domain name. This is determined automatically based on the hostname.
    Please confirm the domain name [example.com]:
  4. The script then reprints the hostname, IP address, and domain name.
    The IPA Master Server will be configured with
    Hostname:    ipaserver.example.com
    IP address:  192.168.1.1
    Domain name: example.com
  5. Enter the new Kerberos realm name. This is usually based on the domain name.
    Please provide a realm name [EXAMPLE.COM]:
  6. Enter the password for the Directory Server superuser, cn=Directory Manager. There are password strength requirements for this password, including a minimum password length.
    Directory Manager password:
    Password (confirm):
  7. Enter the password for the IPA system user account, admin. This user is created on the machine.
    IPA admin password:
    Password (confirm):
  8. After that, the script configures all of the associated services for IPA, with task counts and progress bars.
    Configuring ntpd
      [1/4]: stopping ntpd
     ...
    done configuring ntpd.
    
    Configuring directory server for the CA: Estimated time 30 seconds
      [1/3]: creating directory server user
    ...
    done configuring pkids.
    
    Configuring certificate server: Estimated time 6 minutes
      [1/17]: creating certificate server user
    ....
    done configuring pki-cad.
    
    Configuring directory server: Estimated time 1 minute
      [1/32]: creating directory server user
    ...
    done configuring dirsrv.
    
    Configuring Kerberos KDC: Estimated time 30 seconds
      [1/14]: setting KDC account password
    ...
    done configuring krb5kdc.
    
    Configuring ipa_kpasswd
      [1/2]: starting ipa_kpasswd
      [2/2]: configuring ipa_kpasswd to start on boot
    done configuring ipa_kpasswd.
    
    Configuring the web interface: Estimated time 1 minute
      [1/12]: disabling mod_ssl in httpd
    ...
    done configuring httpd.
    Setting the certificate subject base
    restarting certificate server
    Applying LDAP updates
    Restarting the directory server
    Restarting the KDC
    Restarting the web server
    Sample zone file for bind has been created in /tmp/sample.zone.ygzij5.db
    ==============================================================================
    Setup complete
  9. Restart the SSH service to retrieve the Kerberos principal and to refresh the name server switch (NSS) configuration file:
    # service sshd restart
  10. Authenticate to the Kerberos realm using the admin user's credentials to ensure that the user is properly configured and the Kerberos realm is accessible.
    # kinit admin
    Password for admin@EXAMPLE.COM:
  11. Test the IPA configuration by running a command like ipa user-find. For example:
    # ipa user-find admin
      --------------
      1 user matched
      --------------
      User login: admin
      Last name: Administrator
      Home directory: /home/admin
      Login shell: /bin/bash
      Account disabled: False
      Member of groups: admins
      ----------------------------
      Number of entries returned 1
      ----------------------------

2.4.3. Examples of Creating the IPA Server

The way that an IPA server is installed can be different depending on the network environment, security requirements within the organization, and the desired topology. These example illustrate some common options when installing the server. These examples are not mutually exclusive; it is entirely possible to use CA options, DNS options, and IPA configuration options in the same server invocation. These are called out separately simply to make it more clear what each configuration area requires.

2.4.3.1. Non-Interactive Basic Installation

As shown in Section 2.4.2, “Setting up an IPA Server: Basic Interactive Installation”, only a few pieces of information are required to configured an IPA server. While the setup script can prompt for this information in interactive mode, this information can also be passed with the setup command to allow automated and unattended configuration:
  • Passwords for the IPA administrative user and the Directory Server super user (Directory Manager)
  • The server hostname
  • The Kerberos realm name
  • The DNS domain name
This information can be passed with the ipa-server-install, along with the -U to force it to run without requiring user interaction.
Example 2.1. Basic Installation without Interaction
# ipa-server-install -a secret12 --hostname=ipaserver.example.com --r EXAMPLE.COM -p secret12 -n example.com -U
The script then prints the submitted values:
To accept the default shown in brackets, press the Enter key.

The IPA Master Server will be configured with
Hostname:    ipaserver.example.com
IP address:  192.168.1.1
Domain name: example.com
Then the script runs through the configuration progress for each IPA service, as in Section 2.4.2, “Setting up an IPA Server: Basic Interactive Installation”.

2.4.3.2. Using Different CA Configurations

Identity Management uses an integrated certificate authority (CA) to create the certificates and keytabs used by users and hosts within the domain. There are three different ways that IPA incorporates the CA into the IPA server:
  • The installation script installs a root Dogtag Certificate System CA. The Dogtag Certificate System CA provides the full range of certificate services, based on policies that are defined in the Dogtag Certificate System configuration.
    This is the default configuration.
  • Alternatively, the installation script can set up a Dogtag Certificate System CA that is subordinate to an external CA. A subordinate CA is chained to another CA, and it uses the policies and restrictions defined by that external CA. The root CA can be an external CA like Verisign or a corporate CA.
    A Dogtag Certificate System CA is still installed and configured as part of the IPA server installation, but its CA certificates are issued by the external CA rather than by itself.
  • The IPA server can use self-signed certificates without installing a CA. This is done by using the --selfsign option. When the IPA server uses a self-signed certificate, the setup process is exactly the same as a normal installation, except that no Dogtag Certificate System instance is created. There is still a cacert.p12 file created that can be used by replicas, but the certificate services that the IPA server can perform are much more limited.
Example 2.2. Using a Self-Signed Certificate
# ipa-server-install -a secret12 --hostname=ipaserver.example.com --r EXAMPLE.COM -p secret12 -n example.com -U --selfsign

NOTE

A self-signed certificate should only be used for a testing or development environment.
Alternatively, the IPA server can use a certificate issued by an external CA. This can be a corporate CA or a third-party CA like Verisign or Thawte. As with a normal setup process, using an external CA still uses a Dogtag Certificate System instance for the IPA server for issuing all of its client and replica certificates; the initial CA certificate is simply issued by a different CA.
When using an external CA, there are two additional steps that must be performed: submit the generated certificate request to the external CA and then load the CA certificate and issued server certificate to complete the setup.
Example 2.3. Using an External CA
  1. Run the ipa-server-install script, using the --external-ca option.
    # ipa-server-install -a secret12 --r EXAMPLE.COM -P password -p secret12 -n ipaserver.example.com --external-ca
  2. The script sets up the NTP and Directory Server services as normal.
  3. The script completes the CA setup and returns information about where the certificate signing request (CSR) is located, /root/ipa.csr. This request must be submitted to the external CA.
    Configuring certificate server: Estimated time 6 minutes
      [1/4]: creating certificate server user
      [2/4]: creating pki-ca instance
      [3/4]: restarting certificate server
      [4/4]: configuring certificate server instance
    The next step is to get /root/ipa.csr signed by your CA and re-run ipa-server-install.
  4. Submit the request to the CA. The process differs for every service.
  5. Retrieve the issued certificate and the CA certificate chain for the issuing CA. Again, the process differs for every certificate service, but there is usually a download link on a web page or in the notification email that allows administrators to download all the required certificates. Be sure to get the full certificate chain for the CA, not just the CA certificate.
  6. Rerun ipa-server-install, specifying the locations and names of the certificate and CA chain files. For example:
    # ipa-server-install --external_cert_file=/tmp/servercert20110601.p12 --external_ca_file=/tmp/cacert.p12
  7. Complete the setup process and verify that everything is working as expected, as in Section 2.4.2, “Setting up an IPA Server: Basic Interactive Installation”.

2.4.3.3. Using DNS

IPA can be configured to manage its own DNS, use an existing DNS, or not use DNS services at all (which is the default). Running the setup script alone does not configure DNS; this requires the --setup-dns option.
As with a basic setup, the DNS setup can either prompt for the required information or the DNS information can be passed with the script to allow an automatic or unattended setup process.
Example 2.4. Interactive DNS Setup
  1. Run the ipa-server-install script, using the --setup-dns option.
    # ipa-server-install -a secret12 --r EXAMPLE.COM -P password -p secret12 -n ipaserver.example.com --setup-dns
  2. The script configures the hostname and domain name as normal.
  3. The script then prompts for DNS forwarders. If forwarders will be used, enter yes, and then supply the list of DNS servers. If IPA will manage its own DNS service, then enter no.
    Do you want to configure DNS forwarders? [yes]: no
    No DNS forwarders configured
  4. The script sets up the NTP, Directory Server, Certificate System, Kerberos, and Apache services.
  5. Before completing the configuration, the script prompts to ask whether it should configure reverse DNS services. If you select yes, then it configures the named service.
    Do you want to configure the reverse zone? [yes]: yes
    Configuring named:
      [1/9]: adding DNS container
      [2/9]: setting up our zone
      [3/9]: setting up reverse zone
      [4/9]: setting up our own record
      [5/9]: setting up kerberos principal
      [6/9]: setting up named.conf
      [7/9]: restarting named
      [8/9]: configuring named to start on boot
      [9/9]: changing resolv.conf to point to ourselves
    done configuring named.
    ==============================================================================
    Setup complete
  6. Verify that everything is working as expected, as in Section 2.4.2, “Setting up an IPA Server: Basic Interactive Installation”.

If DNS is used with IPA, then two pieces of information are required: any DNS forwarders that will be used and using (or not) reverse DNS. To perform a non-interactive setup, this information can be passed using the --forwarder or --no-forwarders option and --no-reverse option.
Example 2.5. Setting up DNS Non-Interactively
To use DNS always requires the --setup-dns. To user forwarders, use the --forwarder with a comma-separated list of forwarders.
# ipa-server-install ... --setup-dns --forwarder=1.2.3.0 --forwarder=1.2.255.0
Some kind of forwarder information is required. If no external forwarders will be used with the IPA DNS service, then use the --no-forwarders option to indicate that only root servers will be used.
The script always assumes that reverse DNS is configured along with DNS, so it is not necessary to use any options to enable reverse DNS. To disable reverse DNS, use the --no-reverse option.
# ipa-server-install ... --setup-dns --no-reverse

2.4.4. Troubleshooting Installation Problems

The server installation log is located in /var/log/ipaserver-install.log. The IPA logs, both for the server and for IPA-associated services, are covered in Section 16.1.3, “Checking IPA Server Logs”.
GSS Failures When Running IPA Commands
Immediately after installation, there can be Kerberos problems when trying to run an ipa-* command. For example:
ipa: ERROR: Kerberos error: ('Unspecified GSS failure.  Minor code may provide more information', 851968)/('Decrypt integrity check failed', -1765328353)
There are two potential causes for this:
  • DNS is not properly configured.
  • Active Directory is in the same domain as the IPA server.
named Daemon Fails to Start
If an IPA server is configured to manage DNS and is set up successfully, but the named service fails to start, this can indicate that there is a package conflict. Check the /var/log/messages file for error messages related to the named service and the ldap.so library:
ipaserver named[6886]: failed to dynamically load driver 'ldap.so': libldap-2.4.so.2: cannot open shared object file: No such file or directory
This usually means that the bind-chroot package is installed and is preventing the named service from starting. To resolve this issue, remove the bind-chroot package and then restart the IPA server.
# yum remove bind-chroot

# ipactl restart

2.5. Setting up IPA Replicas

In the IPA domain, there are three types of machines:
  • Servers, which manage all of the services used by domain members
  • Replicas, which are essentially clones of servers
  • Clients, which belong to the Kerberos domains, receive certificates and tickets issued by the servers, and use other centralized services for authentication and authorization
A replica is a clone of a specific IPA server. The server and replica share the same internal information about users, machines, certificates, and configured policies. These data are copied from the server to the replica in a process called replication. The two Directory Server instances used by an IPA server — the Directory Server instance used by the IPA server as a data store and the Directory Server instance used by the Dogtag Certificate System to store certificate information — are replicated over to corresponding consumer Directory Server instances used by the IPA replica.

TIP

If you are using the integrated Dogtag Certificate System instance as the CA for the IPA domain, then it is possible to make a replica of a replica. It is not possible to make a replica of a replica if you use the --selfsign option for the original IPA server.

2.5.1. Prepping and Installing the Replica Server

Replicas are functionally the same as IPA servers, so they have the same installation requirements and packages.
  • Make sure that the machine meets all of the prerequisites listed in Section 2.2, “Preparing to Install the IPA Server”.
  • Install the server packages as in Section 2.3, “Installing the IPA Server Packages”. For example:
    # yum install ipa-server bind bind-dyndb-ldap

    IMPORTANT

    Do not run the ipa-server-install script.
    The replica and the master server must be running the same version of IPA.
  • If there is an existing Dogtag Certificate System or Red Hat Certificate System instance on the replica machine, make sure that port 7389 is free. This port is used by the master IPA server to communicate with the replica.
  • Make sure the appropriate ports are open on both the server and the replica machine during and after the replica configuration. Servers and replicas connect to each other over ports 9443, 9444, 9445, and 7389 during the replica configuration. Once the replica is set up, the server and replica communicate over port 7389.

2.5.2. Creating the Replica

NOTE

Make sure that the replica machine exists in the server's DNS before beginning to configure the replica. If the server cannot contact the replica machine during the configuration process, then the replica configuration fails. If necessary, add a DNS entry, as in Section 8.9, “Adding Records to DNS Zones”.
  1. On the master server, create a replica information file. This contains realm and configuration information taken from the master server which will be used to configure the replica server.
    Run the ipa-replica-prepare command on the master IPA server. The command requires the fully-qualified domain name of the replica machine. Using the --ip-address option automatically creates DNS entries for the replica, including the A and PTR records for the replica to the DNS.
    # ipa-replica-prepare ipareplica.example.com --ip-address 192.168.1.2
    
    Determining current realm name
    Getting domain name from LDAP
    Preparing replica for ipareplica.example.com from ipaserver.example.com
    Creating SSL certificate for the Directory Server
    Creating SSL certificate for the Web Server
    Copying additional files
    Finalizing configuration
    Packaging the replica into replica-info-ipareplica.example.com
    

    IMPORTANT

    This must be a valid DNS name, which means only numbers, alphabetic characters, and hyphens (-) are allowed. Other characters, like underscores, in the hostname will cause DNS failures.
    For more options with ipa-replica-prepare, see Section B.5.2, “ipa-replica-prepare”.
    Each replica information file is created in the /var/lib/ipa/ directory as a GPG-encrypted file. Each file is named specifically for the replica server for which it is intended, such as replica-info-ipareplica.example.com.gpg.

    NOTE

    A replica information file cannot be used to create multiple replicas. It can only be used for the specific replica and machine for which it was created.

    WARNING

    Replica information files contain sensitive information. Take appropriate steps to ensure that they are properly protected.
  2. Copy the replica information file to the replica server:
    # scp /var/lib/ipa/replica-info-ipareplica.example.com.gpg root@ipareplica:/var/lib/ipa/
  3. On the replica server, run the replica installation script, referencing the replication information file. There are other options for setting up DNS, much like the server installation script. For example:
    # ipa-replica-install --setup-dns /var/lib/ipa/replica-info-ipareplica.example.com.gpg
    Additional options for the replica installation script are listed in Section B.5.1, “ipa-replica-install”.
    The replica installation script runs a test to ensure that the replica file being installed matches the current hostname. If they do not match, the script returns a warning message and asks for confirmation. This could occur on a multi-homed machine, for example, where mismatched hostnames may not be an issue.
  4. Enter the Directory Manager password when prompted. The script then configures a Directory Server instance based on information in the replica information file and initiates a replication process to copy over data from the master server to the replica, a process called initialization.
  5. Once the installation process completes, update the DNS entries so that IPA clients can discover the new server. For example, for an IPA replica with a hostname of ipareplica.example.com:
    _ldap._tcp             IN SRV 0 100 389	ipareplica.example.com
    _kerberos._tcp         IN SRV 0 100 88 ipareplica.example.com
    _kerberos._udp         IN SRV 0 100 88 ipareplica.example.com
    _kerberos-master._tcp  IN SRV 0 100 88 ipareplica.example.com
    _kerberos-master._udp  IN SRV 0 100 88 ipareplica.example.com
    _kpasswd._tcp          IN SRV 0 100 464 ipareplica.example.com
    _kpasswd._udp          IN SRV 0 100 464 ipareplica.example.com
    _ntp._udp              IN SRV 0 100 123 ipareplica.example.com
    
  6. Optional. Set up DNS services for the replica. These are not configured by the setup script, even if the master server uses DNS.
    Use the ipa-dns-install command to install the DNS manually, then use the ipa dnsrecord-add command to add the required DNS records. For example:
    # ipa-dns-install
    
    # ipa dnsrecord-add example.com @ --ns-rec ipareplica.example.com.

    IMPORTANT

    Use the fully-qualified domain name of the replica, including the final period (.), otherwise BIND will treat the hostname as relative to the domain.

2.5.3. Troubleshooting Replica Installation

If the replica installation fails on step 3 ([3/11]: configuring certificate server instance), that usually means that the required port is not available. This can be verified by checking the debug logs for the CA, /var/log/pki-ca/debug, which may show error messages about being unable to find certain entries. For example:
[04/Feb/2011:22:29:03][http-9445-Processor25]: DatabasePanel
comparetAndWaitEntries ou=people,o=ipaca not found, let's wait
The only resolution is to uninstall the replica:
# ipa-server-install --uninstall
After uninstalling the replica, ensure that port 7389 on the replica is available, and retry the replica installation.

2.6. Uninstalling IPA Servers and Replicas

To uninstall both an IPA server and an IPA replica, pass the --uninstall option to the ipa-server-install command:
# ipa-server-install --uninstall

Chapter 3. Setting up Systems as IPA Clients

A client is any system which is a member of the Identity Management domain. While this is frequently a Red Hat Enterprise Linux system (and IPA has special tools to make configuring Red Hat Enterprise Linux clients very simple), machines with other operating systems can also be added to the IPA domain.
One important aspect of an IPA client is that only the system configuration determines whether the system is part of the domain. (The configuration includes things like belonging to the Kerberos domain, DNS domain, and having the proper authentication and certificate setup.)

NOTE

IPA does not require any sort of agent or daemon running on a client for the client to join the domain. However, for the best management options, security, and performance, clients should run the System Security Services Daemon (SSSD).
For more information on SSSD, see the SSSD chapter in the Deployment Guide.
This chapter explains how to configure a system to join an IPA domain.

NOTE

Clients can only be configured after at least one IPA server has been installed.

3.1. What Happens in Client Setup

Whether the client configuration is performed automatically on Red Hat Enterprise Linux systems using the client setup script or manually on other systems, the general process of configuring a machine to serve as an IPA client is mostly the same, with slight variation depending on the platform:
  • Retrieve the CA certificate for the IPA CA.
  • Create a separate Kerberos configuration to test the provided credentials. This enables a Kerberos connection to the IPA XML-RPC server, necessary to join the IPA client to the IPA domain. This Kerberos configuration is ultimately discarded.
    Setting up the Kerberos configuration includes specifying the realm and domain details, and default ticket attributes. Forwardable tickets are configured by default, which facilitates connection to the administration interface from any operating system, and also provides for auditing of administration operations. For example, this is the Kerberos configuration for Red Hat Enterprise Linux systems:
    [libdefaults]
    default_realm = EXAMPLE.COM
    dns_lookup_realm = false
    dns_lookup_kdc = false
    rdns = false
    forwardable = yes
    ticket_lifetime = 24h
    
    [realms]
    EXAMPLE.COM = {
          kdc = ipaserver.example.com:88
          admin_server = ipaserver.example.com:749
          }
    [domain_realm]
    .example.com = EXAMPLE.COM
    example.com = EXAMPLE.COM
    
  • Run the ipa-join command to perform the actual join
  • Obtain a service principal for the host service and installs it into /etc/krb5.keytab. For example, host/ipa.example.com@EXAMPLE.COM.
  • Enable certmonger, retrieve an SSL server certificate, and install the certificate in /etc/pki/nssdb.
  • Disable the nscd daemon.
  • Configures SSSD or LDAP/KRB5, including NSS and PAM configuration files.
  • Configure NTP.

3.2. Supported Platforms for IPA Clients

These platforms can be configured to be IPA clients:
  • Red Hat Enterprise Linux 5 and 6
  • Solaris 9 and 10
  • HP-UX 11i
  • AIX 5.2

3.3. Configuring a Red Hat Enterprise Linux System as an IPA Client

There are two elements to prepare before beginning the client setup process for the Red Hat Enterprise Linux client:
  • There must be a way to connect the client machine to the Kerberos domain, either by having an available Kerberos identity (such as the admin user) or by manually adding the client machine to the KDC on the server with a one-time password before beginning the enrollment process for the client machine.
  • If there is an Active Directory server on the same network that serves DNS records, the Active Directory DNS records could prevent the client from automatically detecting the IPA server address. The ipa-client-install script retrieves the Active Directory DNS records instead of any records that were added for IPA.
    In this case, it is necessary to pass the IPA server address directly to the ipa-client-install script.
To configure the client:
  1. Install the client packages. These packages provide a simple way to configure the system as a client; they also install and configure SSSD.
    For a regular user system, this requires only the ipa-client package:
    # yum install ipa-client
    An administrator machine requires the ipa-admintools package, as well:
    # yum install ipa-client ipa-admintools
  2. If the IPA server is configured as the DNS server and is in the same domain as the client, add the server's IP address as the first entry in the client's /etc/resolv.conf file.

    TIP

    If every machine in the domain will be an IPA client, then add the IPA server address to the DHCP configuration.
  3. Run the client setup command.
    # ipa-client-install --enable-dns-updates
    The --enable-dns-updates option updates DNS with the client machine's IP address. This option should only be used if the IPA server was installed with integrated DNS or if the DNS server on the network accepts DNS entry updates with the GSS-TSIG protocol.
    When using the --server option to specify the IPA server to register with, the server name must be a fully-qualified domain name.

    IMPORTANT

    This must be a valid DNS name, which means only numbers, alphabetic characters, and hyphens (-) are allowed. Other characters, like underscores, in the hostname will cause DNS failures.
    Other options for ipa-client-install are listed in Section B.6.1, “ipa-client-install”.

    NOTE

    There is an --on-master option that is used as part of configuring an IPA server (which also is an IPA client, since it is within the domain). This option should never be used when configuring a regular IPA client, because it results in slightly different client configuration which may not work on a non-IPA server machine.
  4. If prompted, enter the domain name for the IPA's DNS domain.
    DNS discovery failed to determine your DNS domain
    Please provide the domain name of your IPA server (ex: example.com): example.com
  5. If prompted, enter the fully-qualified domain name of the IPA server. Alternatively, use the --server option with the client installation script to supply the fully-qualified domain name of the IPA server.
    DNS discovery failed to find the IPA Server
    Please provide your IPA server name (ex: ipa.example.com): ipaserver.example.com

    IMPORTANT

    This must be a valid DNS name, which means only numbers, alphabetic characters, and hyphens (-) are allowed. Other characters, like underscores, in the hostname will cause DNS failures.
  6. The client script then prompts for a Kerberos identity to use to contact and then join the Kerberos realm. When these credentials are supplied, then the client is able to join the IPA Kerberos domain and then complete the configuration:
    Continue to configure the system with these values? [no]: yes
    User authorized to enroll computers: admin
    Password for admin@EXAMPLE.COM:
    Enrolled in IPA realm EXAMPLE.COM
    Created /etc/ipa/default.conf
    Configured /etc/sssd/sssd.conf
    Configured /etc/krb5.conf for IPA realm EXAMPLE.COM
    SSSD enabled
    Kerberos 5 enabled
    NTP enabled
    Client configuration complete.
    
  7. Test that the client can connect successfully to the IPA domain and can perform basic tasks. For example, check that the IPA tools can be used to get user and group information:
    $ id
    $ getent passwd userID
    $ getent group ipausers
  8. Set up NFS to work with Kerberos.

    TIP

    To help troubleshoot potential NFS setup errors, enable debug information in the /etc/sysconfig/nfs file.
    RPCGSSDARGS="-vvv"
    RPCSVCGSSDARGS="-vvv"
    1. On an IPA server, add an NFS service principal for the NFS client.
      # ipa service-add nfs/ipaclient.example.com@EXAMPLE

      NOTE

      This must be run from a machine with the ipa-admintools package installed so that the ipa command is available.
    2. On the IPA server, obtain a keytab for the NFS service principal.
      # ipa-getkeytab -s ipaserver.example.com -p nfs/ipaclient.example.com@EXAMPLE -k /tmp/krb5.keytab

      NOTE

      Some versions of the Linux NFS implementation have limited encryption type support. If the NFS server is hosted on a version older than Red Hat Enterprise Linux 6, use the -e des-cbc-crc option to the ipa-getkeytab command for any nfs/<FQDN> service keytabs to set up, both on the server and on all clients. This instructs the KDC to generate only DES keys.
      When using DES keys, all clients and servers that rely on this encryption type need to have the allow_weak_crypto option enabled in the [libdefaults] section of the /etc/krb5.conf file. Without these configuration changes, NFS clients and servers are unable to authenticate to each other, and attempts to mount NFS filesystems may fail. The client's rpc.gssd and the server's rpc.svcgssd daemons may log errors indicating that DES encryption types are not permitted.
    3. Copy the keytab from the IPA server to the NFS server. For example, if the IPA and NFS servers are on different machines:
      # scp /tmp/krb5.keytab root@nfs.example.com:/etc/krb5.keytab
    4. Copy the keytab from the IPA server to the IPA client. For example:
      # scp /tmp/krb5.keytab root@client.example.com:/etc/krb5.keytab
    5. Configure the /etc/exports file on the NFS server.
      /ipashare       gss/krb5p(rw,no_root_squash,subtree_check,fsid=0)
    6. On the client, mount the NFS share. Use the same -o sec setting as is used in the /etc/exports file for the NFS server.
      [root@client ~]# mount -v -t nfs4 -o sec=krb5p nfs.example.com:/ /mnt/ipashare

3.4. Manually Configuring a Linux Client

The ipa-client-install command automatically configures services like Kerberos, SSSD, PAM, and NSS. However, if the ipa-client-install command cannot be used on a system for some reason, then the IPA client entries and the services can be configured manually.
  1. Install SSSD 1.5.x or later, if it is not already installed.
  2. On an IPA server. Create a host entry for the client.
    $ ipa host-add --force --ip-address=192.168.166.31 client1.example.com
    Creating hosts manually is covered in Section 6.2, “Adding Host Entries”.
  3. On an IPA server. Create keytabs for the client.
    1. Log in as IPA; administrator.
      $ kinit admin
    2. Set the client host to be managed by the server.
      $ ipa host-add-managedby --hosts=ipaserver.example.com client1.example.com
    3. Generate the keytab for the client.
      # ipa-getkeytab -s ipaserver.example.com -p host/client1.example.com -k /tmp/client1.keytab
  4. Copy the keytab to the client machine and rename it /etc/krb5.ketab.

    TIP

    If there is an existing /etc/krb5.ketab that should be preserved, the two files can be combined using ktutil.
  5. Set the correct user permissions and, if necessary, SELinux contexts for the /etc/krb5.ketab file.
    chown root:root 0600
    system_u:object_r:krb5_keytab_t:s0
  6. Configure SSSD by editing the /etc/sssd/sssd.conf file to point to the IPA domain.
    [sssd]
    config_file_version = 2
    services = nss, pam
    
    domains = example.com
    [nss]
    
    [pam]
    
    [domain/example.com]
    cache_credentials = True
    krb5_store_password_if_offline = True
    ipa_domain = example.com
    id_provider = ipa
    auth_provider = ipa
    access_provider = ipa
    ipa_hostname = client1.example.com
    chpass_provider = ipa
    ipa_server = ipaserver.example.com
    ldap_tls_cacert = /etc/ipa/ca.crt
  7. Configure NSS to use SSSD for passwords, groups, users, and netgroups.
    vim /etc/nsswitch.conf
    
    ...
    passwd:     files sss
    shadow:     files sss
    group:      files sss
    ...
    netgroup:   files sss
    ...
  8. Configure the /etc/krb5.conf file to point to the IPA KDC.
    [logging]
     default = FILE:/var/log/krb5libs.log
     kdc = FILE:/var/log/krb5kdc.log
     admin_server = FILE:/var/log/kadmind.log
    
    [libdefaults]
     default_realm = EXAMPLE.COM
     dns_lookup_realm = false
     dns_lookup_kdc = false
     rdns = false
     ticket_lifetime = 24h
     forwardable = yes
     allow_weak_crypto = true
    
    [realms]
     EXAMPLE.COM = {
      kdc = ipaserver.example.com:88
      admin_server = ipaserver.example.com:749
      default_domain = example.com
    }
    
    [domain_realm]
     .example.com = EXAMPLE.COM
     example.com = EXAMPLE.COM
  9. Update the /etc/pam.d configuration to use the pam_sss.so modules.
    • For /etc/pam.d/fingerprint-auth:
      ...
      account     [default=bad success=ok user_unknown=ignore] pam_sss.so
      ...
      session     optional      pam_sss.so
    • For /etc/pam.d/system-auth:
      ...
      auth        sufficient    pam_sss.so use_first_pass
      ...
      account     [default=bad success=ok user_unknown=ignore] pam_sss.so
      ...
      password    sufficient    pam_sss.so use_authtok
      ...
      session     optional      pam_sss.so
    • For /etc/pam.d/password-auth:
      ...
      auth        sufficient    pam_sss.so use_first_pass
      ...
      account     [default=bad success=ok user_unknown=ignore] pam_sss.so
      ...
      password    sufficient    pam_sss.so use_authtok
      ...
      session     optional      pam_sss.so
    • For /etc/pam.d/smartcard-auth:
      ...
      account     [default=bad success=ok user_unknown=ignore] pam_sss.so
      ...
      session     optional      pam_sss.so
  10. Set up NFS to work with Kerberos.

    TIP

    To help troubleshoot potential NFS setup errors, enable debug information in the /etc/sysconfig/nfs file.
    RPCGSSDARGS="-vvv"
    RPCSVCGSSDARGS="-vvv"
    1. On an IPA server, add an NFS service principal for the NFS client.
      # ipa service-add nfs/ipaclient.example.com@EXAMPLE

      NOTE

      This must be run from a machine with the ipa-admintools package installed so that the ipa command is available.
    2. On the IPA server, obtain a keytab for the NFS service principal.
      # ipa-getkeytab -s ipaserver.example.com -p nfs/ipaclient.example.com@EXAMPLE -k /tmp/krb5.keytab

      NOTE

      Some versions of the Linux NFS implementation have limited encryption type support. If the NFS server is hosted on a version older than Red Hat Enterprise Linux 6, use the -e des-cbc-crc option to the ipa-getkeytab command for any nfs/<FQDN> service keytabs to set up, both on the server and on all clients. This instructs the KDC to generate only DES keys.
      When using DES keys, all clients and servers that rely on this encryption type need to have the allow_weak_crypto option enabled in the [libdefaults] section of the /etc/krb5.conf file. Without these configuration changes, NFS clients and servers are unable to authenticate to each other, and attempts to mount NFS filesystems may fail. The client's rpc.gssd and the server's rpc.svcgssd daemons may log errors indicating that DES encryption types are not permitted.
    3. Copy the keytab from the IPA server to the NFS server. For example, if the IPA and NFS servers are on different machines:
      # scp /tmp/krb5.keytab root@nfs.example.com:/etc/krb5.keytab
    4. Copy the keytab from the IPA server to the IPA client. For example:
      # scp /tmp/krb5.keytab root@client.example.com:/etc/krb5.keytab
    5. Configure the /etc/exports file on the NFS server.
      /ipashare       gss/krb5p(rw,no_root_squash,subtree_check,fsid=0)
    6. On the client, mount the NFS share.
      • Always specify the share as nfs_server:/ /mountpoint.
      • Use the same -o sec setting as is used in the /etc/exports file for the NFS server.
      [root@client ~]# mount -v -t nfs4 -o sec=krb5p nfs.example.com:/ /mnt/ipashare

3.5. Configuring a Solaris System as an IPA Client

3.5.1. Configuring Solaris 10

  1. As with Red Hat Enterprise Linux systems, IPA provides an automated method of configuring Solaris 10 to function as an IPA client. On the Solaris client, run the ldapclient with the information for the IPA domain:
    [root@server ~]# ldapclient manual
             -a credentialLevel=anonymous
             -a authenticationMethod=none
             -a defaultSearchBase=dc=example,dc=com
             -a domainName=example.com
             -a defaultServerList=192.168.0.1
             -a attributeMap=group:memberuid=memberUid
             -a attributeMap=group:gidnumber=gidNumber
             -a attributeMap=passwd:gidnumber=gidNumber
             -a attributeMap=passwd:uidnumber=uidNumber
             -a attributeMap=passwd:homedirectory=homeDirectory
             -a attributeMap=passwd:loginshell=loginShell
             -a attributeMap=shadow:userpassword=userPassword
             -a objectClassMap=group:posixGroup=posixgroup
             -a objectClassMap=passwd:posixAccount=posixaccount
             -a objectClassMap=shadow:shadowAccount=posixaccount
             -a serviceSearchDescriptor=passwd:cn=users,cn=accounts,dc=example,dc=com
             -a serviceSearchDescriptor=group:cn=groups,cn=accounts,dc=example,dc=com
  2. Remove the ldap option from all entries in /etc/nsswitch.conf except for the passwd: and group: entries.
  3. Configure and enable NTP and synchronize the time between the client and the IPA server.
    [root@server ~]# ntpdate ipaserver.example.com
  4. Configure the Kerberos client. The Kerberos configuration includes specifying the realm and domain details and default ticket attributes.
    [root@server ~]# vim /etc/krb5/krb5.conf
    
    [libdefaults]
    default_realm = EXAMPLE.COM
    verify_ap_req_nofail = false
    
    [realms]
    EXAMPLE.COM = {
    kdc = ipaserver.example.com
    admin_server = ipaserver.example.com
    }
    
    [domain_realm]
    example.com = EXAMPLE.COM
    .example.com = EXAMPLE.COM
    
    [logging]
    default = FILE:/var/krb5/kdc.log
    kdc = FILE:/var/krb5/kdc.log
    
    [appdefaults]
    kinit = {
    renewable = true
    forwardable= true
    }
    The default file created by ldapclient configures forwardable tickets by default, which makes it possible to connect to the UI from any system and provides a way to audit administration operations.
  5. Configure PAM to use Kerberos authentication. For example:
    [root@server ~]# vim /etc/pam.conf 
    
    # login service (explicit because of pam_dial_auth)
    #
    login   auth requisite          pam_authtok_get.so.1
    login   auth required           pam_dhkeys.so.1
    login   auth sufficient         pam_krb5.so.1 try_first_pass
    login   auth required           pam_unix_auth.so.1
    login   auth required           pam_dial_auth.so.1
    
    # Default definitions for Authentication management
    # Used when service name is not explicitly mentioned for authentication
    #
    other   auth requisite          pam_authtok_get.so.1
    other   auth required           pam_dhkeys.so.1
    other   auth required           pam_unix_cred.so.1
    other   auth sufficient         pam_krb5.so.1
    other   auth required           pam_unix_auth.so.1
    # Default definition for Account management
    # Used when service name is not explicitly mentioned for account management
    #
    other   account requisite       pam_roles.so.1
    other   account required        pam_unix_account.so.1
    other   account required        pam_krb5.so.1
    # Password construction requirements apply to all users.
    # Remove force_check to have the traditional authorized administrator
    # bypass of construction requirements.
    other   password requisite      pam_authtok_check.so.1 force_check
    other   password sufficient     pam_krb5.so.1
    other   password required       pam_authtok_store.so.1
  6. Configure NFS to work with the Kerberos domain.
    1. Add the admin principal on the IPA server.
      [root@server ~]# kadmin.local -q "addprinc testadmin/admin"
    2. Edit the Kerberos KDC ACLs in /var/kerberos/krb5kdc/kadm5.acl on the IPA server to allow access from the NFS client machine.
    3. Use the kclient command to set up the NFS client for Kerberos authentication.
      • Do not set up DNS.
      • Do enter the IPA server and realm information.
      • Do answer yes to configure Kerberized NFS.
      • Do not copy over the master krb5.conf file.
      [root@server ~]# kclient
      
      Starting client setup
      
      ---------------------------------------------------
      Do you want to use DNS for kerberos lookups ? [y/n]: n
              No action performed.
      Enter the Kerberos realm: EXAMPLE.COM
      Specify the KDC hostname for the above realm: ipaserver.example.com
      ipaserver.example.com
      
      Note, this system and the KDC's time must be within 5 minutes of each other for
      Kerberos to function.  Both systems should run some form of time
      synchronization system like Network Time Protocol (NTP).
      
      Setting up /etc/krb5/krb5.conf.
      
      Enter the krb5 administrative principal to be used: testadmin
      Obtaining TGT for testadmin/admin ...
      Password for testadmin/admin@EXAMPLE.COM:
      
      Do you have multiple DNS domains spanning the Kerberos realm EXAMPLE.COM ?
      [y/n]: n
              No action performed.
      
      Do you plan on doing Kerberized nfs ? [y/n]: y
      
      nfs/client.example.com entry ADDED to KDC database.
      nfs/client.example.com entry ADDED to keytab.
      
      host/client.example.com entry ADDED to KDC database.
      host/client.example.com entry ADDED to keytab.
      
      Do you want to copy over the master krb5.conf file ? [y/n]: n
              No action performed.
      
      ---------------------------------------------------
      Setup COMPLETE.
    4. Verify that the NFS service keytab was created:
      [root@server ~]# klist -ket /etc/krb5/krb5.keytab
    5. Verify that the NFS server is accessible:
      [root@server ~]# showmount -e ipaserver.example.com
    6. Make sure that this line is uncommented in the /etc/nfssec.conf file.
      krb5	390003	kerberos_v5	default -	# RPCSEC_GSS
    7. Mount the NFS share.
      [root@server ~]# mount -t nfs4 ipaserver.example.com:/ /mnt/ -o sec=krb5
    8. On the IPA client, use the ktutil command to import the contents into the main host keytab.
      # ktutil
      ktutil: read_kt /tmp/krb5.keytab
      ktutil: write_kt /etc/krb5/krb5.keytab
      ktutil: q

3.5.2. Configuring Solaris 9

  1. Perform steps 1 through 5 in Section 3.5.1, “Configuring Solaris 10” to set up the Solaris 9 client.
  2. Configure the NFS client.
    1. Configure the /etc/exports file on the NFS server.
      /nfs client.example.com(sec=krb5p,rw,sync,fsid=0,no_subtree_check)
    2. Add an NFS service principal for the client.
      [root@server ~]# ipa service-add nfs/client.example.com
    3. Create the NFS keytab file.
      [root@server ~]# ipa-getkeytab -s ipaserver.example.com -p nfs/client.example.com -k /tmp/krb5.keytab -e des-cbc-crc
    4. Copy the keytab from the server to the client.
      [root@server ~]# scp /tmp/krb5.keytab root@client.example.com:/tmp/krb5.keytab
    5. Make sure that this line is uncommented in the /etc/nfssec.conf file.
      krb5	390005	kerberos_v5	default -	# RPCSEC_GSS
    6. Obtain a ticket for the NFS client.
      [root@server ~]# kinit -k nfs/client.example.com
    7. Mount the NFS share.
      [root@server ~]# mount -F nfs -o sec=krb5p ipaserver.example.com:/nfs /mnt/

3.6. Configuring an HP-UX System as an IPA Client

Note

The IPA client installation process requires that an IPA server already exist.

3.6.1. Configuring NTP

Configure and enable NTP and make sure that time is synchronized between the client and the IPA server.

3.6.2. Configuring LDAP Authentication

  1. Install the ldapux client.
     # swinstall -s /path/to/J4269AA_B.04.15.01_HP-UX_B.11.23_IA_PA.depot
  2. Change to the configuration directory, and run the setup script.
    # cd /opt/ldapux/config/
    
    # ./setup

    NOTE

    Running the setup script is only necessary for the first HP-UX client. Every subsequent HP-UX client only needs to know where the LDAP profile is stored. All clients will then use the same configuration.
    For more information on this, see the HP-UX documentation at http://docs.hp.com/en/J4269-90075/ch02s07.html.
    The setup script prompts for information about the IPA LDAP service, such as its port and host, Directory Manager credentials, and schema and directory suffixes.
    Would you like to continue with the setup? [Yes]
    Select which Directory Server you want to connect to ? [RedHat Directory]
    Directory server host ? [ipaserver.example.com]
    Directory Server port number [389]
    Would you like to extend the printer schema in this directory server? [No]
    Would you like to install PublicKey schema in this directory server? [No]
    Would you like to install the new automount schema ? [No]
    Profile Entry DN: [cn=ldapuxprofile,cn=etc,dc=example,dc=com]
    User DN [cn=Directory Manager]
    Password ? [Directory Manager's Password]
    Authentication method ? [ SIMPLE ]
    Enter the number of the hosts you want to specify [1]
    Default Base DN ? [dc=example,dc=com]
    Accept remaining defaults ? [n]
    Client binding [Anonymous]
    Bind time limit [5 seconds]
    Search time limit [no limit]
    Do you want client searches of the directory to follow referrals? [Yes]
    Profile TTL [0 = infinite]
    Do you want to remap any of the standard RFC 2307 attribute? [Yes]
    Specify the service you want to map? [ 3 ]
    [ group ]
    Specify the attribute you want to map [3 for memberuid ]
    Type the name of the attribute memberuid should be mapped to [member]
    Specify the service you want to map? [ 0 = exit ]
    Do you want to remap any of the standard RFC 2307 attribute? [ no this time ]
    Do you want to create custom search descriptors? [ No ]
    
  3. Ensure that the LDAP client daemon is running.
    # ps -ef | grep ldapclientd
    If necessary, start the daemon:
    # /opt/ldapux/bin/ldapclientd
  4. Check that the user and group entries in the LDAP client are correct and available:
    # nsquery passwd admin
    # nsquery group admins
  5. Create a new group on the IPA server.
     # ipa group-add testgroup
  6. Add a test user to the new group.
     # ipa group-add-member -a testuser testgroup
    Validate the new user and group:
    # nsquery passwd testuser
    # nsquery group testgroup
  7. To ensure that the LDAP client daemon starts when the system boots, add the following lines to the /etc/opt/ldapux/ldapclientd.conf file:
    [StartOnBoot]
    enable=yes
    

3.6.3. Configuring Kerberos

Edit the /etc/krb5.conf file to reflect the Kerberos domain used by the IPA server. Setting up the Kerberos configuration includes specifying the realm and domain details, and default ticket attributes. Forwardable tickets are configured by default, which facilitates connection to the administration interface from any operating system, and also provides for auditing of administration operations. For example:
[libdefaults]
default_realm = EXAMPLE.COM
default_keytab_name = FILE:/etc/krb5.keytab
default_tkt_enctypes = des3-cbc-sha1 arcfour-hmac aes256-cts des-cbc-md5 des-cbc-crc
default_tgs_enctypes = des3-cbc-sha1 arcfour-hmac aes256-cts des-cbc-md5 des-cbc-crc
ccache_type = 2

[realms]
EXAMPLE.COM = {
      kpasswd_server = ipaserver.example.com
      kdc = ipaserver.example.com:88
      admin_server = ipaserver.example.com:749
      default_domain = example.com
      }

[domain_realm]
.example.com = EXAMPLE.COM
example.com = EXAMPLE.COM

[appdefaults]
kinit = {
      forwardable = true
      }

3.6.4. Configuring PAM

The PAM configuration differs slightly between different versions of HP-UX.

3.6.4.1. HP-UX 11i v2

Edit the /etc/pam.conf file so that all of the required modules are loaded for authentication. For example:
#
# PAM configuration
#
# This pam.conf file is intended as an example only.
# see pam.conf(4) for more details

# Authentication management
#
login auth required libpam_hpsec.so.1
login auth sufficient libpam_krb5.so.1
login auth required libpam_unix.so.1 try_first_pass
su auth required libpam_hpsec.so.1
su auth sufficient libpam_krb5.so.1
su auth required libpam_unix.so.1 try_first_pass
dtlogin auth required libpam_hpsec.so.1
dtlogin auth sufficient libpam_krb5.so.1
dtlogin auth required libpam_unix.so.1 try_first_pass
dtaction auth required libpam_hpsec.so.1
dtaction auth sufficient libpam_krb5.so.1
dtaction auth required libpam_unix.so.1 try_first_pass
ftp auth required libpam_hpsec.so.1
ftp auth sufficient libpam_krb5.so.1
ftp auth required libpam_unix.so.1 try_first_pass
sshd auth required libpam_hpsec.so.1
sshd auth sufficient libpam_krb5.so.1
sshd auth required libpam_unix.so.1 try_first_pass
OTHER auth required libpam_unix.so.1
#

# Account management
#
login account required libpam_hpsec.so.1
login account sufficient libpam_krb5.so.1
login account required libpam_unix.so.1
su account required libpam_hpsec.so.1
su account sufficient libpam_krb5.so.1
su account required libpam_unix.so.1
dtlogin account required libpam_hpsec.so.1
dtlogin account sufficient libpam_krb5.so.1
dtlogin account required libpam_unix.so.1
dtaction account required libpam_hpsec.so.1
dtaction account sufficient libpam_krb5.so.1
dtaction account required libpam_unix.so.1
ftp account required libpam_hpsec.so.1
ftp account sufficient libpam_krb5.so.1
ftp account required libpam_unix.so.1
sshd account required libpam_hpsec.so.1
sshd account sufficient libpam_krb5.so.1
sshd account required libpam_unix.so.1
OTHER account required libpam_unix.so.1
#

# Session management
#
login session required libpam_hpsec.so.1
login session sufficient libpam_krb5.so.1
login session required libpam_unix.so.1
dtlogin session required libpam_hpsec.so.1
dtlogin session sufficient libpam_krb5.so.1
dtlogin session required libpam_unix.so.1
dtaction session required libpam_hpsec.so.1
dtaction session sufficient libpam_krb5.so.1
dtaction session required libpam_unix.so.1
sshd session required libpam_hpsec.so.1
sshd session sufficient libpam_krb5.so.1
sshd session required libpam_unix.so.1
OTHER session required libpam_unix.so.1
#

# Password management
#
login password required libpam_hpsec.so.1
login password sufficient libpam_krb5.so.1
login password required libpam_unix.so.1
passwd password required libpam_hpsec.so.1
passwd password sufficient libpam_krb5.so.1
passwd password required libpam_unix.so.1
dtlogin password required libpam_hpsec.so.1
dtlogin password sufficient libpam_krb5.so.1
dtlogin password required libpam_unix.so.1
dtaction password required libpam_hpsec.so.1
dtaction password sufficient libpam_krb5.so.1
dtaction password required libpam_unix.so.1
OTHER password required libpam_unix.so.1

3.6.4.2. HP-UX 11i v1

Edit the /etc/pam.conf file to reflect the following example:
#
# PAM configuration
#
# This pam.conf file is intended as an example only.
# see pam.conf(4) for more details
#

# Authentication management
#
login auth sufficient /usr/lib/security/libpam_krb5.1
login auth required /usr/lib/security/libpam_unix.1 try_first_pass
su auth sufficient /usr/lib/security/libpam_krb5.1
su auth required /usr/lib/security/libpam_unix.1 try_first_pass
dtlogin auth sufficient /usr/lib/security/libpam_krb5.1
dtlogin auth required /usr/lib/security/libpam_unix.1 try_first_pass
dtaction auth sufficient /usr/lib/security/libpam_krb5.1
dtaction auth required /usr/lib/security/libpam_unix.1 try_first_pass
ftp auth sufficient /usr/lib/security/libpam_krb5.1
ftp auth required /usr/lib/security/libpam_unix.1 try_first_pass
OTHER auth required /usr/lib/security/libpam_unix.1
#

# Account management
#
login account sufficient /usr/lib/security/libpam_krb5.1
login account required /usr/lib/security/libpam_unix.1
su account sufficient /usr/lib/security/libpam_krb5.1
su account required /usr/lib/security/libpam_unix.1
dtlogin account sufficient /usr/lib/security/libpam_krb5.1
dtlogin account required /usr/lib/security/libpam_unix.1
dtaction account sufficient /usr/lib/security/libpam_krb5.1
dtaction account required /usr/lib/security/libpam_unix.1
ftp account sufficient /usr/lib/security/libpam_krb5.1
ftp account required /usr/lib/security/libpam_unix.1
OTHER account required /usr/lib/security/libpam_unix.1
#

# Session management
#
login session sufficient /usr/lib/security/libpam_krb5.1
login session required /usr/lib/security/libpam_unix.1
dtlogin session sufficient /usr/lib/security/libpam_krb5.1
dtlogin session required /usr/lib/security/libpam_unix.1
dtaction session sufficient /usr/lib/security/libpam_krb5.1
dtaction session required /usr/lib/security/libpam_unix.1
OTHER session required /usr/lib/security/libpam_unix.1
#

# Password management
#
login password sufficient /usr/lib/security/libpam_krb5.1
login password required /usr/lib/security/libpam_unix.1
passwd password sufficient /usr/lib/security/libpam_krb5.1
passwd password required /usr/lib/security/libpam_unix.1
dtlogin password sufficient /usr/lib/security/libpam_krb5.1
dtlogin password required /usr/lib/security/libpam_unix.1
dtaction password sufficient /usr/lib/security/libpam_krb5.1
dtaction password required /usr/lib/security/libpam_unix.1
OTHER password required /usr/lib/security/libpam_unix.1

3.6.5. Configuring SSH

  1. Ensure that you have version A.05.10.007 or later of ssh installed. A current package can be downloaded from the HP website at http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA.
  2. Edit the /etc/opt/ssh/ssh_config file:
    • Remove any PreferredAuthentications entries.
    • Add the following lines:
      Host *
      	GSSAPIAuthentication yes
      	GSSAPITrustDNS no
      	PreferredAuthentications "gssapi-with-mic,publickey,password"
      

      IMPORTANT

      Include the tab character before the GSSAPIAuthentication, GSSAPITrustDNS, and PreferredAuthentications lines, and include the double quotes around the PreferredAuthentications value.
  3. Remove the /etc/krb5.keytab file.
  4. Set up the NFS/Kerberos mapping for the Solaris client on the IPA server.
    1. Add a host service principal for the HP-UX client.
       # ipa service-add host/hpuxipaclient.example.com
    2. Create the host keytab file.
       # ipa-getkeytab -s ipaserver.example.com -p host/hpuxipaclient.example.com -k /tmp/krb5.keytab -e des-cbc-crc
    3. Copy this keytab to the HP-UX machine, and save it as /etc/krb5/krb5.keytab.
       # scp /tmp/krb5.keytab root@hpuxipaclient.example.com:/etc/krb5/krb5.keytab

3.6.6. Configuring Access Control

HP-UX systems provide the pam_authz PAM module, which can be used to control login access to the system based on a user's group membership. For details on how to configure access control with this module, see the HP documentation at http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02261530/c02261530.pdf.
Example 3.1. pam_authz.policy File: Allow User Access, Deny Admin Access
This configuration in /etc/opt/ldapux/pam_authz.policy prevents the admin user from logging in while still allowing regular users to log in.
# pam_authz.policy.template:
#
# An example file that could be copied over to /etc/opt/ldapux/pam_authz.policy.
# pam_authz.policy is a local policy file that PAM_AUTHZ would use to help
# determine which users would be allowed to login to the local host.
#
# In this template file, by default, the only active access rule is
#     "allow:unix_local_user"
# All the local users are authorized to login.
#
# The policy file contains one or more access rule. The format of an access
# rule is <action>:<type>:<object>
#
# where   <action> could be "deny", "allow", "status"
#                           "PAM_SUCCESS", "PAM_PERM_DENIED", "PAM_MAXTRIES"
#                           "PAM_AUTH_ERR", "PAM_NEW_AUTHTOK_REQD",
#                           "PAM_AUTHTOKEN_REQD, "PAM_CRED_INSUFFICIENT",
#                           "PAM_AUTHINFO_UNAVAIL", "PAM_USER_UNKNOWN"
#                           "PAM_ACCT_EXPIRED", "PAM_AUTHOK_EXPIRED"
#
#                           Note: "status" must use along with "rhds" or
#                           "ads" <type>.
#         <type>   could be "unix_user", "unix_local_user", "unix_group",
#                           "netgroup", ldap_filter", "ldap_group"
#                           "rhds" or "ads"
#
#                           Note: When <type> is set to "rhds" or "ads",
#                           the <action> filed must set to "status".
#         <object> contains search information. For example,
#

deny:unix_group:admins
allow:unix_local_user

3.6.7. Testing the Configuration

NOTE

By default, the admin user is given /bin/bash as the shell to use and /home/admin as the home directory. It may be necessary to install bash to be able to log in.
There are two quick ways to check the Kerberos and PAM configuration for the HP client:
  • Authenticate as an administrator on a Linux box that is a client in the IPA domain, and then attempt to SSH into the HP machine. The admin user should be able to log in using SSH without being asked for a password.
    # kinit admin
    
    # ssh admin@hpuxipaclient.example.com
  • Log into the IPA web UI using the administrator credentials on the HP machine.

3.7. Configuring an AIX System as an IPA Client

3.7.1. Prerequisites

Make sure that all of these packages are installed on the AIX machine before beginning the client configuration:
  • v5.3 OS
  • v5.3 Updates
  • krb5 client packages
  • openssh
  • wget
  • bash
  • krb5 server
  • ldap.client
  • openssl
  • modcrypt.base (for gssd)
Configure and enable NTP and make sure that time is synchronized between the client and the IPA server.

3.7.2. Configuring the AIX Client

Setting up an AIX client requires setting up the client to work in the IPA Kerberos domain and, optionally, to enable SSH authentication to the AIX client using IPA credentials.
Kerberos configuration includes specifying the realm and domain details, and default ticket attributes. Forwardable tickets are configured by default, which facilitates connection to the administration interface from any operating system, and also provides for auditing of administration operations. For example:
  1. Configure the krb5 client settings to use the IPA Kerberos domain:
    # mkkrb5clnt -r EXAMPLE.COM -d example.com -c ipaclient.example.com -s ipaserver.example.com
  2. Get a Kerberos ticket:
    # kinit admin
  3. Configure the LDAP client settings to use the IPA directory services:
    # mksecldap -c -h ipaserver.example.com -d cn=accounts,dc=example,dc=com -a uid=nss,cn=sysaccounts,cn=etc,dc=example,dc=com -p secret
  4. In the /etc/security/ldap directory, create user and group map files:
    • For example, for the IPAuser.map file:
      #IPAuser.map file
      keyobjectclass  SEC_CHAR        posixaccount    s
      
      # The following attributes are required by AIX to be functional
      username        SEC_CHAR        uid     s
      id      SEC_INT uidnumber       s
      pgrp    SEC_CHAR        gidnumber       s
      home    SEC_CHAR        homedirectory   s
      shell   SEC_CHAR        loginshell      s
      gecos   SEC_CHAR        gecos   s
      spassword       SEC_CHAR        userpassword    s
      lastupdate      SEC_INT shadowlastchange        s
      
    • For example, for the IPAgroup.map file:
      #IPAgroup.map file
      groupname       SEC_CHAR        cn      s
      id      SEC_INT gidNumber       s
      users   SEC_LIST        member  m
      
  5. Modify the /etc/security/ldap/ldap.cfg file to set the REALM and base DN values for the IPA domain.
    userbasedn:cn=users,cn=accounts,dc=example,dc=com
    groupbasedn:cn=groups,cn=accounts,dc=example,dc=com
    
    userattrmappath:/etc/security/ldap/IPAuser.map
    groupattrmappath:/etc/security/ldap/IPAgroup.map
    
    userclasses:posixaccount
    
  6. Start the LDAP client daemon:
    # start-secldapclntd
  7. Test the LDAP client connection to the IPA server:
    # lsldap -a passwd
  8. Add the following sections to the /usr/lib/security/methods.cfg file to configure the system login to use Kerberos and LDAP:
    KRB5A:
    program = /usr/lib/security/KRB5A
    program_64 = /usr/lib/security/KRB5A_64
    options = authonly
    
    LDAP:
    program = /usr/lib/security/LDAP
    program_64 =/usr/lib/security/LDAP64
    
    KRB5ALDAP:
    options = auth=KRB5A,db=LDAP
    
  9. Edit the /etc/security/user file, and modify the default section to use the Kerberos/LDAP system and the LDAP user registry.
    SYSTEM = "KRB5ALDAP"
    registry = LDAP
    
  10. To test the Kerberos configuration, log in as an IPA user and verify that the user and group information is correct:
    $ id
  11. Optionally, configure the IPA client to accept incoming SSH requests and authenticate with the user's Kerberos credentials.
    1. Set the SSH syslog configuration:
      auth.info       /var/log/sshd.log
      auth.info       /var/log/sshd.log
      auth.crit       /var/log/sshd.log
      auth.warn       /var/log/sshd.log
      auth.notice     /var/log/sshd.log
      auth.err        /var/log/sshd.log
      
    2. Set the SSH logging configuration:
      SyslogFacility AUTH
      LogLevel INFO
      
    3. Configure sshd to use GSS-API, including disabling DNS for GSS-API:
      vim /etc/ssh/sshd_config
      
      # GSSAPI options
      GSSAPIAuthentication yes
      #GSSAPICleanupCredentials yes
      GSSAPITrustDNS no
      
    4. Restart the sshd daemon:
      # stopsrc -s sshd
      # startsrc -s sshd
    5. Restart the syslogd daemon:
      # stopsrc -s syslogd
      # startsrc -s syslogd
    6. Add the client to the IPA server's Kerberos configuration.
      1. Add a host service principal for the client.
         # ipa service-add host/ipaclient.example.com
      2. Retrieve the host keytab.
         # ipa-getkeytab -s ipaserver -p host/ipaclient.example.com -k /tmp/krb5.keytab -e des-cbc-crc
      3. Copy the keytab from the server to the client.
         # scp /tmp/krb5.keytab root@ipaclient.example.com:/tmp/krb5.keytab
    7. On the IPA client, use the ktutil command to import the contents into the main host keytab.
      # ktutil
      ktutil: read_kt /tmp/krb5.keytab
      ktutil: write_kt /etc/krb5/krb5.keytab
      ktutil: q
      
    8. On the IPA server, add a user that is only used for authentication. (This can be substituted with krb5 authentication if that works from the LDAP client). Otherwise go to the IPA server and use ldapmodify, bind as Directory Manager and create this user. The user should be assigned a shared password.
      ldapmodify -D "cn=directory manager" -w secret -p 389 -h ipaserver.example.com -x -a
      
      dn: uid=nss,cn=sysaccounts,cn=etc,dc=example,dc=com
      objectClass: account
      objectClass: simplesecurityobject
      objectClass: top
      uid: nss
      userPassword: secretpassword
      
    9. On the IPA server, get a ticket for the admin user.
       # kinit admin
    10. To test the SSH configuration, try to log in as the admin user using SSH without providing a password.
       # ssh admin@ipaclient.example.com

NOTE

By default, the admin user is given /bin/bash as the shell to use and /home/admin as the home directory. It may be necessary to install bash to be able to log in.

3.8. Troubleshooting Client Installations

For clients configured using ipa-client-install, the client installation log is located in /var/log/ipaclient-install.log. The IPA logs, both for the server and client and for IPA-associated services, are covered in Section 16.1.3, “Checking IPA Server Logs”.
These are some issues and workarounds for client installation problems.
The client can't resolve reverse hostnames when using an external DNS.
While IPA can host its own DNS server as part of the domain services, it can also use external DNS name server. However, because of some of the limitations of reverse DNS, there can be problems with resolving reverse lookups if the external DNS is listed in the client's /etc/resolv.conf file or if there are other resources on the network with SRV records, like Active Directory.
The problem is that the external DNS name server returns the wrong hostname for the IPA server.
One way this exhibits is errors with finding the IPA server in the Kerberos database:
Jun 30 11:11:48 server1 krb5kdc[1279](info): AS_REQ (4 etypes {18 17 16 23}) 192.168.60.135: NEEDED_PREAUTH: admin EXAMPLE COM for krbtgt/EXAMPLE COM EXAMPLE COM, Additional pre-authentication required
Jun 30 11:11:48 server1 krb5kdc[1279](info): AS_REQ (4 etypes {18 17 16 23}) 192.168.60.135: ISSUE: authtime 1309425108, etypes {rep=18 tkt=18 ses=18}, admin EXAMPLE COM for krbtgt/EXAMPLE COM EXAMPLE COM
Jun 30 11:11:49 server1 krb5kdc[1279](info): TGS_REQ (4 etypes {18 17 16 23}) 192.168.60.135: UNKNOWN_SERVER: authtime 0,  admin EXAMPLE COM for HTTP/server1.wrong.example.com@EXAMPLE.COM, Server not found in Kerberos database
There are several ways to work around this issue:
  • Edit the /etc/resolv.conf file to remove the external DNS name server references.
  • Add reverse lookup records for each IPA server.
  • Give the IPA client or domain a subnet and forward all requests for that subnet.

3.9. Uninstalling an IPA Client

For Red Hat Enterprise Linux clients, the ipa-client-install utility can be used to uninstall the client and remove it from the IPA domain. To remove the client, use the --uninstall option.
# ipa-client-install --uninstall

NOTE

There is an uninstall option with the ipa-join command. This is called by ipa-client-install --uninstall as part of the uninstallation process. However, while the ipa-join option removes the client from the domain, it does not actually uninstall the client or properly remove all of the IPA-related configuration. Do not run ipa-join -u to attempt to uninstall the IPA client. The only way to uninstall a client completely is to use ipa-client-install --uninstall.

Chapter 4. Basic Usage

All of the access to Identity Management, both through the web UI and through the command line, is done by a user authenticating to the IPA domain. This chapter covers the basics of setting up browsers to handle Kerberos authentication, logging into Identity Management, and troubleshooting some common connection issues.

4.1. About the IPA Client Tools

IPA creates a domain of recognized services, host machines, and users with universally-applied authentication sources and common policies. From the perspective of a client machine and an IPA user, the domain itself is fairly transparent after the initial configuration. All users need to do is log into the domain using Kerberos, and that's it.
However, an administrator has two ongoing tasks: add principals to the IPA Kerberos domain and set the domain policies and server configuration that govern domain interactions. Identity Management has both command-line and web-based interfaces for administrators to use to manage the domain, services, and IPA entries.

4.1.1. About the IPA Command-Line Tools

The most common method to maintain the domain is using the command-line tools. Identity Management has an incredibly broad set of scripts and commands that are available to administrators. The command-line scripts offer a number of benefits:
  • The scripts allow management tasks to be automated and performed repeatedly in a consistent way without manual intervention.
  • Entries can be added with all possible attributes configured (or a desired subset of attributes) in a single step. The web UI frequently requires two steps to fully configure an entry: the first to create the entry and the next to add optional attributes.
  • The command-line scripts support adding additional attributes which may not be available in the UI or even custom attributes to entries, if the schema is configured.
The potential disadvantage to the command-line scripts is that they are complex, which makes them difficult to use.

4.1.1.1. ipa and Other Command-Line Scripts

There are two basic categories of command-line scripts that Identity Management has available.
The first is a selection of independent configuration scripts which are used to set up machines that operate within the domain. Most commonly, these are scripts to add machines to the domain (including ipa-server-install, ipa-client-install, and ipa-replica-install). Some scripts are also available to enable services within the IPA server. The domain server has a large number of different installation options and services — such as DNS, certificate services, and NIS management. All of these can be enabled at the time the server is set up, but none of those services are required. If a server is configured without a service like DNS, that service can be enabled later using a specific installation script, such as ipa-dns-install.
The real management functions of the domain are carried out with a single script: ipa. The ipa command is essentially a big plug-in container, and it supports dozens of plug-ins which it executes as subcommands. For example, adding a user is done using the user-add plug-in, which is run like a user-add subcommand:
ipa user-add options
Related subcommands are grouped together into plug-in modules. Commands for managing DNS entries like dnszone-add and dnsrecord-add all belong to the dns module or topic. All of the information for managing a specific area, with all of the supported commands and examples for each, are available by viewing the help for that topic:
ipa help topic
To get a list of all available help topics, run the help command without a topic name:
ipa help

4.1.1.2. Adding Attributes with --setattr and --addattr

For the most common attributes, the ipa use specified command-line arguments to set values. For example, adding a mail attribute to a user can be done with the --mail argument; enabling dynamic updates for a DNS zone can be done with the --allow-dynupdate option with zone commands; and a map key for an automount map is given in the --key option.
However, entries can also allow attributes that may not have command-line (or UI) options for setting them. Partially, this is because the underlying LDAP schema is very rich, particularly for user entries. Additionally, Identity Management allows limited schema extensions for users and groups, and those custom schema elements are not reflected in the UI or command-line tools.
Most ipa allow the --setattr and --addattr options to define attributes and values explicitly.
Both options have this format:
--setattr=attribute=value
The --setattr option sets one value for the given attribute; any existing values are overwritten, even for multi-valued attributes.
The --addattr option adds a new value for an attribute; for a multi-valued attribute, it adds the new value while preserving any existing values.
Both --setattr option and --addattr can be used multiple times in the same command invocation. For example:
$ ipa user-mod jsmith --addattr=mail=johnnys@me.com --addattr=mail=jsmith@example.com --setattr=description="backup IT manager for the east coast branch"

4.1.1.3. Tips for Running IPA Tools

The IPA command-line tools are run as any other utilities in a shell. If there are special characters in the command — such as angle brackets (> and <), ampersands (&), asterisks (*), and pipes (|) — the characters must be escaped. Otherwise, the command fails because the shell cannot properly parse the unescaped characters.

4.1.2. Looking at the IPA UI

The Identity Management web UI is designed for simplicity. This was the primary design goal, and this means that the web UI offers benefits that make using IPA simpler and clearer:
  • It shows instant, visual relationships between entries (such as a user and all the groups, sudo rules, netgroups, and policies which are associated with that user).
  • All entries are listed immediately without having to run a search. This makes it possible to browse entries. The UI also has a simple search box which quickly filters the list of entries.
  • The interface is intuitive to use, without having to learn the command-line tools.
  • The web UI can be accessed from machines outside the IPA domain, so the domain can be managed from anywhere.
    Using the web UI requires a valid Kerberos ticket for the IPA domain (by default), meaning that it can only be accessed from a machine within the IPA domain. Alternatively, the web UI can be configured to allow password authentication along with Kerberos authentication (Section 4.3.5, “Enabling Username/Password Authentication in Your Browser”), or a machine outside the IPA can be configured to work with Kerberos (Section 4.3.4, “Using a Browser on Another System”).

4.1.2.1. The UI Layout

The web UI has three major functional areas which correspond to each of the major functions of IPA: identity management, policy management, and domain configuration.
Table 4.1. Configuration Areas Per Tab
Main Menu Tab Configuration Areas
Identity
  • User entries
  • User groups entries
  • Host/client entries
  • Host group entries
  • Netgroups entries
  • Domain services entries
  • DNS (if configured)
Policy
  • Host-based access control
  • Sudo rules
  • Automount
  • User password policies
  • Kerberos ticket policy
Access controls within Identity Management
  • Role-based access control (permissions based on group membership)
  • Self permissions
  • Delegations (user access control over other users)

The main menu at the top of every page has three tabs which correspond to the functional areas listed in Table 4.1, “Configuration Areas Per Tab”. When a tab is selected, there is a submenu of the different configuration areas. Some configuration areas may have multiple possible entries; for example, role-based access controls define user roles/groups, the areas that access can be granted or denied (privileges), and then the permissions granted to those areas. Each separate configuration entry has its own task area beneath the primary configuration area.
The Main Menu
Figure 4.1. The Main Menu

All entries for a configuration area are listed together on the main page for that area. This page provides direct links to individual entry pages, as well as basic information (the attributes) about the entry. (This is usually just the description, but user entries show a lot more information.)
The page also has some tasks that can be performed on it. For a list page that shows entries, this can be creating or deleting an entry. For a list page for groups, the tasks are for establishing relationships between entities, either by adding (enrolling) or removing an entity from that group. Both individual entries and groups can be searched for through the list page.
List View
Figure 4.2. List View

Each entry page is a form which allows that entry to be edited. This is done by editing text fields or by selecting items from drop-down menus.
Form/Entry View
Figure 4.3. Form/Entry View

4.1.2.2. Page Elements

The web UI uses common elements on all pages.
The most basic is that all blue text is a link to an entry or to an action.
When a task like adding an entry or saving a change is possible, the task link it blue. When it is not possible (such as no items have been selected to be deleted) then the task is grayed out.

All list pages display direct links to entry pages. However, some entries are essentially nested. For example, in automount configuration, the primary entry is the location, and then keys, mount points, and maps are associated with that location as children entries. This hierarchy is reflected in breadcrumb navigation near the top of the page, so it is easy to identify where you are in the UI and how this entry relates to any other related entries.
Entry Breadcrumbs
Figure 4.5. Entry Breadcrumbs

Most entries have a variety of different configuration areas. A simple user entry has account activity settings, personal information, address information, organizational information, and other contact information. Related attributes are grouped together logically in the UI. These entry form areas can be collapsed or expanded using the arrows to control the amount of information displayed on the page.
Collapsing and Expanding Form Elements
Figure 4.6. Collapsing and Expanding Form Elements

When entries are created, they are added with only the required attributes. Additional attributes can be added manually. Some attributes have default values added to the entry and simply need to be edited; other attributes may not exist at all in the new entry and need to be added.
Add an Attribute
Figure 4.7. Add an Attribute

Any changes to any attribute can be undone. A single attribute change can be undone by clicking the dynamic undo button; all changes can be undone by clicking the Reset link at the top of the entry details page.
Undo Edits
Figure 4.8. Undo Edits

4.1.2.3. Showing and Changing Group Members

Members can be added to a group through the group configuration. There are tabs for all the member types which can belong to the group, and an administrator picks all of the marching entries and adds them as members.
However, it is also possible for an entity to be added to a group through its own configuration. Each entry has a list of tabs that displays group types that the entry can join. The list of all groups of that type are displayed, and the entity can be added to multiple groups at the same time.
Member Of...
Figure 4.9. Member Of...

4.1.2.4. Looking at Search Results

Searches can be performed on attributes that are not displayed in the UI. This means that entries can be returned in a search that do not appear to match the given filter. This is especially common if the search information is very short, which increases the likelihood of a match.
For more information on setting and changing attributes which are searched, see Section 5.7.3, “Setting User Search Attributes” and Section 5.7.4, “Setting Group Search Attributes”.

4.2. Logging into IPA

Users are authenticated to IPA services, including the command-line tools and the web UI, using Kerberos authentication. This means that logging into Identity Management requires running kinit.
Running kinit issues the user a Kerberos ticket. This ticket is checked by any IPA or Kerberos-aware service, so that a user only needs to log in once to access all domain services. Domain services include the IPA web UI, mounted file shares, wikis, or any other application which uses IPA as its identity/authentication store.

4.2.1. Logging into IPA

Logging into Identity Management requires running kinit on a client within the IPA domain.
$ kinit
The kinit command must be run from a machine which has been configured as a client within the IPA domain, so that the client retrieves authenticates with the IPA KDC.
Simply running kinit logs into IPA as the currently logged-in user account. This user account must also be an IPA user for them to authenticate to the IPA Kerberos domain successfully. For example, if you are logged into the machine as jsmith:
$ kinit
Password for jsmith@EXAMPLE.COM:

NOTE

If SSSD or pam_krb5 is configured on the IPA client machine, then when a user logs into the machine, a ticket is created which can be used for machine services which require authentication, such as sudo.

4.2.2. Logging in When an IPA User Is Different Than the System User

To specify an IPA username — because a person's system username is different then the IPA username or to switch IPA user accounts — simply rerun the kinit command, specifying the new user. For example:
$ kinit userName 
Password for userName@EXAMPLE.COM:
When the server was first set up, an administrative user, admin, is created to perform normal administrative activities. To authenticate as the admin user, use the name admin when running kinit:
$ kinit admin

NOTE

Only one set of tickets can be stored per logged-in user. The current stored credentials are the ones that will be used when accessing IPA services.
If you were already connected to the IPA web UI as another user, refresh the browser to display the updated details for the new user.

4.2.3. Checking the Current Logged in User

Use the klist command to verify the identity and the ticket granting ticket (TGT) from the server:
$ klist
Ticket cache: FILE:/tmp/krb5cc_500
Default principal: ipaUser@EXAMPLE.COM

Valid starting     Expires            Service principal
11/10/08 15:35:45  11/11/08 15:35:45  krbtgt/EXAMPLE.COM@EXAMPLE.COM

Kerberos 4 ticket cache: /tmp/tkt500
klist: You have no tickets cached
It's important to know who the authenticated user is because the currently-authenticated user is the only one who can access the IPA services. The Kerberos client libraries for kinit have some limitation, one of them being that the current ticket is overwritten with any new invocation of kinit. Authenticating as User A and then authenticating as User B overwrites User A's ticket.
To allow there to be multiple authenticated users on a machine, set the KRB5CCNAME environment variable. This variable keeps credential caches separate in different shells.

4.2.4. Caching User Kerberos Tickets

Only one set of tickets can be stored per logged-in user. The current stored credentials are the ones that will be used when accessing IPA services.
For example, if you authenticated as admin, added a new user, set the password, and then tried to authenticate as that user, the administrator's ticket is lost.
To keep separate credential caches in different shells, a special environment variable, KRB5CCNAME, can be used.

4.3. Using the IPA Web UI

In order to use the web UI, the user must be authenticated with the IPA Kerberos domain and have an active Kerberos ticket (Section 4.2, “Logging into IPA”). Generally, the web UI can only be accessed from an IPA server or client machine and the user must be locally authenticated. There are a couple of ways to work around this, either by configuring Kerberos on a non-domain machine to connect to the Kerberos domain (Section 4.3.4, “Using a Browser on Another System”) or by enabling password authentication to the UI (Section 4.3.5, “Enabling Username/Password Authentication in Your Browser”).

4.3.1. Supported Web Browsers

The only supported browser to access the IPA web UI is Firefox 3.x or 4.x.

4.3.2. Opening the IPA Web UI

The browser must be properly configured, as described in Section 4.3.3, “Configuring the Browser”, to support Kerberos authentication so that the user can connect to the UI.
To open the web UI:
  1. Get a valid Kerberos ticket using kinit, as in Section 4.2, “Logging into IPA”.
  2. Open the IPA URL. The full URL is https://IPAserver-FQDN/ipa/ui, but this service is also accessed simply by opening https://IPAserver-FQDN. For example:
    https://server.example.com
    https://server.example.com/ipa/ui

4.3.3. Configuring the Browser

Firefox can use Kerberos credentials to authenticate to the IPA UI, but Kerberos negotiation needs to be configured to use the IPA domain. At the first log-in attempt, if Firefox has not been configured to support Kerberos authentication, then an error message appears.
Kerberos Authentication Error
Figure 4.10. Kerberos Authentication Error

If you see that error, then the IPA web UI can perform the required configuration:
  1. Click the follow these directions link.
  2. Click the link to import the CA certificate for the IPA server.
  3. Set the web site and software developer (first and last) trust bits for the CA certificate.
  4. Click the Configure Firefox button. This automatically fills out all the negotiate settings in the Firefox configuration to use the IPA domain settings.
    When the process is complete, a success box pops up saying that Firefox has been configured for single sign-on. For there, you are redirected to the IPA web UI.
This can also be done manually:
  1. Open Firefox.
  2. Type about:config in the address bar.
  3. In the Search field, type negotiate to filter out the Kerberos-related parameters.
  4. On Red Hat Enterprise Linux, enter the domain name for the URI parameters, including the preceding period (.) and set the gsslib parameter to true:
    network.negotiate-auth.trusted-uris  .example.com
    network.negotiate-auth.delegation-uris  .example.com
    network.negotiate-auth.using-native-gsslib true
  5. Open the web UI by going to the fully-qualified domain name of the IPA server such as http://ipaserver.example.com. Make sure that you can open the web UI and that there are no Kerberos authentication errors.
  6. Next, download the IPA server's CA certificate from http://ipa.example.com/ipa/config/ca.crt.
  7. Select the first (Trust this CA to identify web sites) and third (Trust this CA to identify software developers) check boxes.

4.3.4. Using a Browser on Another System

It is possible to connect to the Identity Management web UI from a system which is not a member of the IPA domain. In this case, it is possible to specify an IPA-specific Kerberos configuration file on the external (non-IPA) machine before running kinit, and then the user can authenticate against the IPA server domain.
This is especially useful there are multiple realms or overlapping domains across your infrastructure.
  1. Copy the /etc/krb5.conf file from the IPA server.
    # scp /etc/krb5.conf root@externalmachine.example.com:/etc/krb5_ipa.conf

    WARNING

    Do not overwrite the existing krb5.conf file.
  2. On the external machine, set the terminal session to use the copied IPA Kerberos configuration file:
    $ export KRB5_CONFIG=/etc/krb5_ipa.conf
  3. Configure Firefox on the external machine as in Section 4.3.3, “Configuring the Browser”.

4.3.5. Enabling Username/Password Authentication in Your Browser

If Kerberos authentication fails, then browser login also fails. That prevents access to the IPA web UI. Configuring username/password authentication for the UI allows users to log in even if there are problems with the Kerberos service.
  1. Open the ipa.conf file used by the Apache web service.
    vim /etc/httpd/conf.d/ipa.conf
  2. In the <Location "/ipa"> location definition, change the KrbMethodK5Passwd attribute from off to on.
    KrbMethodK5Passwd on
  3. Restart the httpd service:
    # service httpd restart
When this is configured, the web UI prompts for an IPA username and password if it can't detect any Kerberos credentials.
IPA Password Prompt
Figure 4.11. IPA Password Prompt

NOTE

This must be configured on every IPA server in the domain.

4.3.6. Using the UI with Proxy Servers

Proxy servers can be used to access the web UI without any additional configuration in IPA.
Port forwarding is not supported with the IPA server. However, because it is possible to use proxy servers with IPA, an operation similar to port forwarding can be configured using proxy forwarding with OpenSSH and the SOCKS option. This is described in http://www.meadowy.org/~gotoh/ssh/openssh-socks.html.

4.3.7. Troubleshooting UI Connection Problems

If negotiate authentication is not working, turn on verbose logging for the authentication process to help diagnose the issue:
  1. Close all browser windows.
  2. In a terminal, set the new log levels for Firefox:
    export NSPR_LOG_MODULES=negotiateauth:5
    export NSPR_LOG_FILE=/tmp/moz.log
    
    This enables verbose logging and logs all information to /tmp/moz.log.
  3. Restart the browser from the same terminal window and attempt t .
Some of the common error messages and workarounds are in Table 4.2, “UI Error Log Messages”.
Table 4.2. UI Error Log Messages
Error Log Message Description and Fix
-1208550944[90039d0]: entering nsNegotiateAuth::GetNextToken()
-1208550944[90039d0]: gss_init_sec_context() failed: Miscellaneous failure
No credentials cache found
There are no Kerberos tickets. Run kinit.
-1208994096[8d683d8]: entering nsAuthGSSAPI::GetNextToken()
-1208994096[8d683d8]: gss_init_sec_context() failed: Miscellaneous failure
Server not found in Kerberos database
This can occur when you have successfully obtained Kerberos tickets but are still unable to authenticate to the UI. This indicates that there is a problem with the Kerberos configuration. The first place to check is the [domain_realm] section in the /etc/krb5.conf file. Make sure that the IPA Kerberos domain entry is correct and matches the configuration in the Firefox negotiation parameters. For example:
.example.com = EXAMPLE.COM
example.com = EXAMPLE.COM
Nothing is in the log file. It is possible that you are behind a proxy which is removing the HTTP headers required for negotiate authentication. Try to connect to the server using HTTPS instead, which allows the request to pass through unmodified. Then check the log file again.

Chapter 5. Identity: Managing Users and User Groups

5.1. Setting up User Home Directories
5.1.1. About Home Directories
5.1.2. Enabling the PAM Home Directory Module
5.1.3. Manually Automounting Home Directories
5.2. Managing User Accounts
5.2.1. About User Entries
5.2.1.1. About User Schema
5.2.1.2. About Username Formats
5.2.1.3. About Changing the Default User and Group Schema
5.2.1.4. Applying Custom Object Classes to New User Entries
5.2.1.5. Applying Custom Object Classes to New Group Entries
5.2.2. Adding Users
5.2.2.1. From the Web UI
5.2.2.2. From the Command Line
5.2.3. Editing Users
5.2.3.1. From the Web UI
5.2.3.2. From the Command Line
5.2.4. Activating and Deactivating User Accounts
5.2.4.1. From the Web UI
5.2.4.2. From the Command Line
5.2.5. Deleting Users
5.2.5.1. With the Web UI
5.2.5.2. From the Command Line
5.3. Changing Passwords
5.3.1. From the Web UI
5.3.2. From the Command Line
5.4. Managing Unique UID and GID Number Assignments
5.4.1. About ID Range Assignments During Installation
5.4.2. Adding New Ranges
5.5. Managing User Groups
5.5.1. Creating User Groups
5.5.1.1. With the Web UI
5.5.1.2. With the Command Line
5.5.2. Adding Group Members
5.5.2.1. With the Web UI (Group Page)
5.5.2.2. With the Web UI (User's Page)
5.5.2.3. With the Command Line
5.5.2.4. Viewing Direct and Indirect Members of a Group
5.5.3. Deleting User Groups
5.5.3.1. With the Web UI
5.5.3.2. With the Command Line
5.6. Searching for Users and Groups
5.6.1. With the UI
5.6.2. With the Command Line
5.7. Specifying Default User and Group Settings
5.7.1. Viewing the Settings Configuration
5.7.1.1. From the Web UI
5.7.1.2. From the Command Line
5.7.2. Setting Default Search Limits
5.7.2.1. With the Web UI
5.7.2.2. With the Command Line
5.7.3. Setting User Search Attributes
5.7.3.1. From the Web UI
5.7.3.2. From the Web UI
5.7.4. Setting Group Search Attributes
5.7.4.1. From the Web UI
5.7.4.2. From the Command Line
Users in Identity Management are able to access services and servers within the domain through Kerberos authentication. This chapter covers general management tasks for users, groups, password policies, and other configuration for users.

5.1. Setting up User Home Directories

A home directory is required for any IPA user. Without a home directory in the expected location, a user may be unable to log into the domain. While systems administrators can manage home directories outside of IPA, it is also possible to use a PAM module to create home directories automatically on both IPA servers and clients.

5.1.1. About Home Directories

IPA, as part of managing users, can manage user home directories. However, IPA has certain defined parameters for any managed home directories:
  • The default prefix for users' home directories is /home.
  • IPA does not automatically create home directories when users log in. Automatically creating home directories requires either the pam_oddjob_mkhomedir module or the pam_mkhomedir module. This module can be configured as part of client installation or after installation, as described in Section 5.1.2, “Enabling the PAM Home Directory Module”.
    The home directory process for IPA first attempts to use the pam_oddjob_mkhomedir module because this requires fewer user privileges and access to create the home directories, as well as integrating smoothly with SELinux. If this module is not available, then the process falls back to the pam_mkhomedir module.
  • It is possible to use an NFS file server that provides /home that can be made available to all machines in the domain and then automounted on the IPA server.
    There are potential issues when using NFS, such as security issues related to granting root access to the NFS user, performance issues with loading the entire /home tree, and network performance issues for using remote servers for home directories. There are some general guidelines for using NFS with Identity Management:
    • Use automount to mount only the user's home directory and only when the user logs in, rather than loading the entire /home tree.
    • Use a remote user who has limited permissions to create home directories and mount the share on the IPA server as that user. Since the IPA server runs as an httpd process, it is possible to use sudo or a similar program to grant limited access to the IPA server to create home directories on the NFS server.
    • Use a mechanism, such as the pam_oddjob_mkhomedir module, to create the home directory as that user.
    Using automounts for home directories is described in Section 5.1.3, “Manually Automounting Home Directories”.
  • If a suitable directory and mechanism are not available for to create home directories, users may not be able to log in.

5.1.2. Enabling the PAM Home Directory Module

For a home directory to be created automatically when a user logs in, IPA can use either the pam_oddjob_mkhomedir module or the pam_mkhomedir module. Because it requires fewer permissions and works well with SELinux, IPA preferentially uses the pam_oddjob_mkhomedir module. If that module is not installed, then it falls back to the pam_mkhomedir module.

NOTE

IPA does not require the pam_oddjob_mkhomedir module or pam_mkhomedir module. This is because the *_mkhomedir module may try to create home directories even when the shared storage is not available. If the module is unable to create the home directory, then users can be blocked from logging into the IPA domain.
The system administrator must activate this module on each client or server as needed.
There are two ways to enable the pam_oddjob_mkhomedir (or pam_mkhomedir) module:
  • The --mkhomedir option can be used with the ipa-client-install command. While this is possible for clients, this option is not available to servers when they are set up.
  • The pam_oddjob_mkhomedir module can be enabled using the system's authconfig command. For example:
    authconfig --enablemkhomedir
    This option can be used for both server and client machines post-installation.

5.1.3. Manually Automounting Home Directories

While PAM modules can be used to create home directories for users automatically, this may not be desirable behavior in every environment. In that case, home directories can be manually added to the IPA server from separate locations using NFS shares and automount.
  1. Create a new location for the user directory maps:
    $ ipa automountlocation-add userdirs
    Location: userdirs
  2. Add a direct map to the new location's auto.direct file. In this example, the mount point is /share:
    $ ipa automountkey-add userdirs auto.direct --key=/share --info="-ro,soft, ipaserver.example.com:/home/share"
    
    Key: /share
    Mount information: -ro,soft, ipaserver.example.com:/home/share
Using automounts with IPA is described in detail in Chapter 9, Policy: Using Automount.

5.2. Managing User Accounts

5.2.1. About User Entries

User accounts in IPA are ultimately stored as user accounts in an LDAP directory. This grants both flexibility and certain restrictions on the structure and information stored in IPA user entries.

5.2.1.1. About User Schema

When a user entry is created, it is automatically assigned certain LDAP object classes which, in turn, make available certain attributes. LDAP attributes are the way that information is stored in the directory. (This is discussed in detail in the Directory Server Deployment Guide and the Directory Server Schema Reference.)
Table 5.1. Default Identity Management User Object Classes
Description Object Classes
IPA object classes ipaobject
Person object classes
person
organizationalperson
inetorgperson
inetuser
posixaccount
Kerberos object classes
krbprincipalaux
krbticketpolicyaux
Managed entries (template) object classes mepOriginEntry

A number of attributes are available to user entries. Some are set manually and some are set based on defaults if a specific value is not set. There is also an option to add any attributes available in the object classes in Table 5.1, “Default Identity Management User Object Classes”, even if there is not a UI or command-line argument for that attribute. Additionally, the values generated or used by the default attributes can be configured, as in Section 5.7, “Specifying Default User and Group Settings”.
Table 5.2. Default Identity Management User Attributes
UI Field Command-Line Option Required, Optional, or Default[a]
User login username Required
First name --first Required
Last name --last Required
Full name --cn Optional
Display name --displayname Optional
Initials --initials Default
Home directory --homedir Default
GECOS field --gecos Default
Shell --shell Default
Kerberos principal --principal Default
Email address --email Optional
Password --password
Unlike the other options, this accepts no value. The script prompts for the new password.
Optional
User ID number

IMPORTANT

When a user is created without specifying a UID number, then the user account is automatically assigned an ID number that is next available in the server or replica range. (Number ranges are described more in Section 5.4, “Managing Unique UID and GID Number Assignments”.) This means that a user always has a unique number for its UID number and, if configured, for its private group.
If a number is manually assigned to a user entry, the server does not validate that the uidNumber is unique. It will allow duplicate IDs; this is expected (though discouraged) behavior for POSIX entries.
If two entries are assigned the same ID number, only the first entry is returned in a search for that ID number. However, both entries will be returned in searches for other attributes or with ipa user-find --all.
--uid Default
Group ID number

IMPORTANT

When a user is created without specifying a GID number, then the user account is automatically assigned an ID number that is next available in the server or replica range. (Number ranges are described more in Section 5.4, “Managing Unique UID and GID Number Assignments”.) This means that a user always has a unique number for its UID number and, if configured, for its private group.
If a number is manually assigned to a user entry, the server does not validate that the uidNumber is unique. It will allow duplicate IDs; this is expected (though discouraged) behavior for POSIX entries.
If two entries are assigned the same ID number, only the first entry is returned in a search for that ID number. However, both entries will be returned in searches for other attributes or with ipa user-find --all.
--gidnumber Default
Street address --street Optional
City --city Optional
State/Province --state Optional
Zip code --postalcode Optional
Telephone number --phone Optional
Mobile telephone number --mobile Optional
Pager number --pager Optional
Fax number --fax Optional
Organizational unit --orgunit Optional
Job title --title Optional
Manager --manager Optional
Car license --carlicense Optional
Additional attributes --addattr Optional
[a] Required attributes must be set for every entry. Optional attributes may be set, while default attributes are automatically added with a pre-defined value unless a specific value is given.

5.2.1.2. About Username Formats

IPA supports a wide range of username formats, based on this regular expression:
[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?

TIP

The trailing $ symbol is permitted for Samba 3.x machine support.
Any system limits — such as starting a username with a number on Unix systems — apply to the usernames in IPA.

5.2.1.3. About Changing the Default User and Group Schema

It is possible to add or change the object classes and attributes used for user and group entries (Section 5.2.1.1, “About User Schema”).
The IPA configuration provides some validation when object classes are changed:
  • All of the object classes and their specified attributes must be known to the LDAP server.
  • All default attributes that are configured for the entry must be supported by the configured object classes.
There are limits to the IPA schema validation, however. Most important, the IPA server does not check that the defined user or group object classes contain all of the required object classes for IPA entries. For example, all IPA entries require the ipaobject object class. However, when the user or group schema is changed, the server does not check to make sure that this object class is included; if the object class is accidentally deleted, then future entry add operations will fail.
Also, all object class changes are atomic, not incremental. The entire list of default object classes has to be defined every time there is a change. For example, a company may create a custom object class to store employee information like birthdays and employment start dates. The administrator cannot simply add the custom object class to the list; he must set the entire list of current default object classes plus the new object class. The existing default object classes must always be included when the configuration is updated. Otherwise, the current settings will be overwritten, which causes serious performance problems.

5.2.1.4. Applying Custom Object Classes to New User Entries

User and group accounts are created with a pre-defined set of LDAP object classes applied to the entry. Any attributes which belong to the object class can be added to the user entry.
While the standard and IPA-specific LDAP object classes will cover most deployment scenarios, administrators may have custom object classes with custom attributes which should be applied to user entries.
5.2.1.4.1. From the Web UI
  1. Add all of the custom schema elements to the 389 Directory Server instance used by Identity Management. Adding schema elements is described in the schema chapter of the Directory Server Administrator's Guide.
  2. Open the IPA Server tab.
  3. Select the Configuration subtab.
  4. Scroll to the User Options area.
  5. At the bottom of the users area, click the Add link to add a new field for another object class.

    IMPORTANT

    Always include the existing default object classes when the configuration is updated. Otherwise, the current settings will be overwritten. If any object classes required by Identity Management are not included, then subsequent attempts to add an entry will fail with object class violations.
  6. When the changes are complete, click the Update link at the top of the Configuration page.
5.2.1.4.2. From the Command Line
  1. Add all of the custom schema elements to the 389 Directory Server instance used by Identity Management. Adding schema elements is described in the schema chapter of the Directory Server Administrator's Guide.
  2. Add the new object class to the list of object classes added to entries. The option for user object classes is --userobjectclasses.

    IMPORTANT

    Always include the existing default object classes when the configuration is updated. Otherwise, the current settings will be overwritten. If any object classes required by Identity Management are not included, then subsequent attempts to add an entry will fail with object class violations.
    For example:
    $ ipa config-mod --userobjectclasses=top,person,organizationalperson,inetorgperson,inetuser,posixaccount, krbprincipalaux,krbticketpolicyaux,ipaobject,employeeinfo

5.2.1.5. Applying Custom Object Classes to New Group Entries

As with user entries, administrators may have custom object classes with custom attributes which should be applied to group entries. These can be added automatically by adding the object classes to the IPA server configuration.
5.2.1.5.1. From the Web UI
  1. Add all of the custom schema elements to the 389 Directory Server instance used by Identity Management. Adding schema elements is described in the schema chapter of the Directory Server Administrator's Guide.
  2. Open the IPA Server tab.
  3. Select the Configuration subtab.
  4. Scroll to the Group Options area.
  5. Click the Add link to add a new field for another object class.

    IMPORTANT

    Always include the existing default object classes when the configuration is updated. Otherwise, the current settings will be overwritten. If any object classes required by Identity Management are not included, then subsequent attempts to add an entry will fail with object class violations.
  6. When the changes are complete, click the Update link at the top of the Configuration page.
5.2.1.5.2. From the Command Line
  1. Add all of the custom schema elements to the 389 Directory Server instance used by Identity Management. Adding schema elements is described in the schema chapter of the Directory Server Administrator's Guide.
  2. Add the new object class to the list of object classes added to entries. The option for group object classes is --groupobjectclasses.

    IMPORTANT

    Always include the existing default object classes when the configuration is updated. Otherwise, the current settings will be overwritten. If any object classes required by Identity Management are not included, then subsequent attempts to add an entry will fail with object class violations.
    For example:
    $ ipa config-mod --groupobjectclasses=top,groupofnames,nestedgroup,ipausergroup,ipaobject,employeegroup

5.2.2. Adding Users

5.2.2.1. From the Web UI

  1. Open the Identity tab, and select the Users subtab.
  2. Click the Add link at the top of the users list.
  3. Fill in the user's first and last names. The user login (UID) is automatically generated based on the user's full name, but this can be set manually by clicking the Optional field link.
  4. Click the Add and Edit button to go directly to the expanded entry page and fill in more attribute information, as in Section 5.2.3.1, “From the Web UI”. The user entry is created with some basic information already filled in, based on the given user information and the user entry template.

5.2.2.2. From the Command Line

New user entries are added with the user-add command. Attributes (listed in Table 5.2, “Default Identity Management User Attributes”) can be added to the entry with specific values or the command can be run with no arguments.
$ ipa user-add [username] [attributes]
When no arguments are used, the command prompts for the required user account information and uses the defaults for the other attributes, with the defaults printed below. For example:
$ ipa user-add
First name: John
Last name: Smith
User login [jsmith]: jsmith
--------------------
Added user "jsmith"
--------------------
User login: jsmith
First name: John
Last name: Smith
Home directory: /home/jsmith
GECOS field: jsmith
Login shell: /bin/sh
Kerberos principal: jsmith@EXAMPLE.COM
UID: 387115841
Any of the user attributes can be passed with the command. This will either set values for optional attributes or override the default values for default attributes.
$ ipa user-add jsmith --first=John --last=Smith --manager=bjensen --email=johnls@example.com --homedir=/home/work/johns --password

IMPORTANT

When a user is created without specifying a UID or GID number, then the user account is automatically assigned an ID number that is next available in the server or replica range. (Number ranges are described more in Section 5.4, “Managing Unique UID and GID Number Assignments”.) This means that a user always has a unique number for its UID number and, if configured, for its private group.
If a number is manually assigned to a user entry, the server does not validate that the uidNumber is unique. It will allow duplicate IDs; this is expected (though discouraged) behavior for POSIX entries.
If two entries are assigned the same ID number, only the first entry is returned in a search for that ID number. However, both entries will be returned in searches for other attributes or with ipa user-find --all.

5.2.3. Editing Users

5.2.3.1. From the Web UI

  1. Open the Identity tab, and select the Users subtab.
  2. Click the name of the user to edit.
  3. There are a number of different types of attributes that can be edited for the user. All of the default attributes are listed in Table 5.2, “Default Identity Management User Attributes”. Most of the attributes in the Identity Settings and Account Settings areas have default values filled in for them, based on the user information or on the user entry template.
  4. Edit the fields or, if necessary, click the Add link by an attribute to create the attribute on the entry.
  5. When the edits are done, click the Update link at the top of the page.

5.2.3.2. From the Command Line

The user-mod command edits user accounts by adding or changing attributes. At its most basic, the user-mod specifies the user account by login ID, the attribute to edit, and the new value:
$ ipa user-mod loginID --attributeName=newValue
For example, to change a user's work title from Editor II to Editor III:
$ ipa user-mod jsmith --title="Editor III"
Identity Management allows multi-valued attributes, based on attributes in LDAP that are allowed to have multiple values. For example, a person may have two email addresses, one for work and one for personal, that are both stored in the mail attribute. Managing multi-valued attributes can be done using the --addattr option.
If an attributes allows multiple values — like mail — simply using the command-line argument will overwrite the value with the new value. This is also true for using --setaddr. However, using --addattr will add a new attribute; for a multi-valued attribute, it adds the new value in addition to any existing values.
Example 5.1. Multiple Mail Attributes
A user is created first using his work email account.
$ ipa user-add jsmith --first=John --last=Smith --email=johnls@example.com
Then, his personal email account is added.
$ ipa user-mod jsmith --addattr=mail=johnnys@me.com
Both email addresses are listed for the user.
$ ipa user-find jsmith --all
--------------
1 user matched
--------------
  dn: uid=jsmith,cn=users,cn=accounts,dc=example,dc=com
  User login: jsmith
  .....
  Email address: jsmith@example.com, jsmith@new.com
To set two values at the same time, use the --addattr option twice:
$ ipa user-add jsmith --first=John --last=Smith --email=johnls@example.com --addattr=mail=johnnys@me.com --addattr=mail=admin@example.com

5.2.4. Activating and Deactivating User Accounts

User accounts can be deactivated. A deactivated user cannot log into IPA or its related services (like Kerberos) and he cannot perform any tasks. However, the user account still exists within Identity Management and all of the associated information remains unchanged.

NOTE

Any existing connections remain valid until the Kerberos TGT and other tickets expire. Once the ticket expires, the user cannot renew the ticket.

5.2.4.1. From the Web UI

  1. Open the Identity tab, and select the Users subtab.
  2. Click the name of the user for whom to deactivate or activate.
  3. Scroll to the Account Settings area.
  4. Click the Deactivate link.
  5. Click the Update link at the top of the page.

5.2.4.2. From the Command Line

Users are activated and disabled using user-enable and user-disable commands. All that is required is the user login. For example:
$ ipa user-disable jsmith

5.2.5. Deleting Users

Deleting a user account permanently removes the user entry and all its information from IPA, including group memberships and passwords. External configuration — like a system account and home directory — will still exist on any server or local machine where they were created, but they cannot be accessed through IPA.
Deleting a user account is permanent. The information cannot be recovered; a new account must be created.

NOTE

If all admin users are deleted, then you must use the Directory Manager account to create a new administrative user.
Alternatively, any user who belongs in the group management role can also add a new admin user.

5.2.5.1. With the Web UI

  1. Open the Identity tab, and select the Users subtab.
  2. Select the checkboxes by the names of the users to delete.
  3. Click the Delete link at the top of the task area.
  4. When prompted, confirm the delete action.

5.2.5.2. From the Command Line

Users are deleted using the user-del command and then the user login. For example, a single user:
$ ipa user-del jsmith
To delete multiple users, simply list the users, separated by spaces.
$ ipa user-del jsmith bjensen mreynolds cdickens
When deleting multiple users, use the --continue option to force the command to continue regardless of errors. A summary of the successful and failed operations is printed to stdout when the command completes. If --continue is not used, then the command proceeds with deleting users until it encounters an error, and then it exits.

5.3. Changing Passwords

Password policies (Chapter 11, Policy: Defining Password Policies) and minimal access restrictions can be applied to a password change operation:
  • Regular, non-administrative users can change only their personal passwords, and all passwords are constrained by the IPA password policies.
    This allows administrators to create intro passwords or to reset passwords easily, while still keeping the final password confidential. Since any password sent by an administrator to the user is temporary, there is little security risk.
  • Changing a password as the IPA admin user overrides any IPA password policies, but the password expires immediately. This requires the user to change the password at the next login. Similarly, any user who has password change rights can change a password and no password policies are applied, but the other user must reset the password at the next log in.
  • Changing a password as the LDAP Directory Manager user, using LDAP tools, overrides any IPA password policies.

5.3.1. From the Web UI

  1. Open the Identity tab, and select the Users subtab.
  2. Click the name of the user for whom to reset the password. All users can change their own password; only administrators or users with delegated permissions can change other user's passwords.
  3. Scroll to the Account Settings area.
  4. Click the Reset Password link.
  5. In the pop-up box, enter and confirm the new password.

5.3.2. From the Command Line

Changing a password — your own or another user's — is done using the user-mod command, as with other user account changes.
$ ipa user-mod jsmith --password

5.4. Managing Unique UID and GID Number Assignments

An IPA server must generate random UID and GID values and simultaneously ensure that replicas never generate the same UID or GID value. The need for unique UID and GID numbers might even cross IPA domains, if a single organization has multiple disparate domains.
The UID and GID numbers are divided into ranges. By keeping separate numeric ranges for individual servers and replicas, the chances are minimal that any numbers issued by one server or replica will duplicate those from another. Ranges are updated and shared intelligently between servers and replicas through the Dynamic Numeric Assignment (DNA) Plug-in, as part of the backend 389 Directory Server instance for the domain. The same range is used for user IDs (uidNumber) and group IDs (gidNumber). A user and a group may have the same ID, but since the ID is set in different attributes, there is no conflict. Using the same ID number for both a user and a group also allows an administrator to configure user private groups, where a unique system group is created for each user and the ID number is the same for both the user and the group.

IMPORTANT

When a user is created interactively or without specifying a UID or GID number, then the user account is created with an ID number that is next available in the server or replica range. This means that a user always has a unique number for its UID number and, if configured, for its private group.
If a number is manually assigned to a user entry, the server does not validate that the uidNumber is unique. It will allow duplicate IDs; this is expected (though discouraged) behavior for POSIX entries. The same is true for group entries: a duplicate gidNumber can be manually assigned to the entry.
If two entries are assigned the same ID number, only the first entry is returned in a search for that ID number. However, both entries will be returned in searches for other attributes or with ipa user-find --all.

5.4.1. About ID Range Assignments During Installation

The IPA administrator can initially define a range during server installation, using the --idstart and --idmax options with ipa-server-install. These options are not required, so the setup script can assign random ranges during installation.
If no range is set manually when the first IPA server is installed, a range of 200,000 IDs is randomly selected. There are 10,000 possible ranges. Selecting a random range from that number provides a high probability of non-conflicting IDs if two separate IPA domains are ever merged in the future.
With a single IPA server, IDs are assigned to entries in order through the range. With replicas, the initial server ID range is split and distributed.
When a replica is installed, it is configured with an invalid range. It also has a directory entry (that is shared among replicas) that instructs the replica where it can request a valid range. When the replica starts, or as its current range is depleted so that less than 100 IDs are available, it can contact one of the available servers for a new range allotment. A special extended operation splits the range in two, so that the original server and the replica each have half of the available range.

5.4.2. Adding New Ranges

If the range for the entire domain is close to depletion, a new range can be manually selected and assigned to one of the master servers. All replicas then request ID ranges from the master as necessary.
The changes to the range are done by editing the 389 Directory Server configuration to change the DNA Plug-in instance. The range is defined in the dnaNextRange parameter. For example:
ldapmodify -x -D "cn=Directory Manager" -W -h server.example.com -p 389
Enter LDAP Password: *******
dn: cn=Posix IDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config
changetype: modify
add: dnaNextRange
dnaNextRange: 123400000-123500000

NOTE

This command only adds the specified range of values; it does not check that the values in that range are actually available. This check is performed when an attempt is made to allocate those values. If a range is added that contains mostly values that were already allocated, the system will cycle through the entire range searching for unallocated values, and then the operation ultimately fails if none are available.

5.5. Managing User Groups

User groups are a way of centralizing control over important management tasks, particularly access control and password policies. Three groups are created during the installation, specifically for use by IPA operations:
  • ipausers, which contains all users.
  • admins, which contains administrative users. The initial admin user belongs to this group.
  • editors, which is a special group for users working through the web UI. This group allows users to edit other users' entries, though without all of the rights of the admin user.
All groups in Identity Management are essentially static groups, meaning that the members of the group are manually and explicitly added to the group. Tangentially, IPA allows nested groups, where a group is a member of another group. In that case, all of the group members of the member group automatically belong to the parent group, as well.
Because groups are easy to create, it is possible to be very flexible in what groups to create and how they are organized. Groups can be defined around organizational divisions like departments, physical locations, or IPA or infrastructure usage guidelines for access controls.

NOTE

Some operating systems limit the number of groups that can be assigned to system users. For example, Solaris and AIX systems both limit users to 16 groups per user. This can be an issue when using nested groups, when a user may be automatically added to multiple groups.
When a group entry is created, it is automatically assigned certain LDAP object classes. (LDAP object classes and attributes are discussed in detail in the Directory Server Deployment Guide and the Directory Server Schema Reference.) For groups, only two attributes truly matter: the name and the description.
Table 5.3. Default Identity Management Group Object Classes
Description Object Classes
IPA object classes
ipaobject
ipausergroup
nestedgroup
Group object classes
groupofnames
posixgroup

5.5.1. Creating User Groups

5.5.1.1. With the Web UI

  1. Open the Identity tab, and select the User Groups subtab.
  2. Click the Add link at the top of the groups list.
  3. Enter all of the information for the group.
    • A unique name. This is the identifier used for the group in the IPA domain, and it cannot be changed after it is created. The name cannot contain spaces, but other separators like an underscore (_) are allowed.
    • A text description of the group.
    • Whether the group is a Posix group, which adds Linux-specific information to the entry. By default, all groups are Posix groups unless they are explicitly configured not to be. Non-Posix groups can be created for interoperability with Windows or Samba.
    • Optionally, the GID number for the group. All Posix groups require a GID number, but IPA automatically assigns the GID number.
      Setting a GID number is not necessary because of the risk of collisions. If a GID number is given manually, IPA will not override the specified GID number, even if it not unique.
  4. Click the Add and Edit button to go immediately to the member selection page.
  5. Select the members, as described in Section 5.5.2.1, “With the Web UI (Group Page)”.

5.5.1.2. With the Command Line

New groups are created using the group-add command. (This adds only the group; members are added separately.)
Two attributes are always required: the group name and the group description. If those attributes are not given as arguments, then the script prompts for them.
$ ipa group-add groupName --desc="description" [--nonposix]
Additionally, there is one other configuration option, --nonposix. (By default, all groups are created as POSIX groups.) To enable interoperability with Windows users and groups and programs like Samba, it is possible to create non-POSIX groups by using the --nonposix option. This option tells the script not to add the posixGroup object class to the entry.
For example:
$ ipa group-add examplegroup --desc="for examples" --nonposix

----------------------
Added group "examplegroup"
----------------------
  Group name: examplegroup
  Description: for examples
  GID: 855800010
When no arguments are used, the command prompts for the required group account information:
$ ipa group-add
Group name: engineering
Description: for engineers
-------------------------
Added group "engineering"
-------------------------
  Group name: engineering
  Description: for engineers
  GID: 387115842

IMPORTANT

When a group is created without specifying a GID number, then the group entry is assigned the ID number that is next available in the server or replica range. (Number ranges are described more in Section 5.4, “Managing Unique UID and GID Number Assignments”.) This means that a group always has a unique number for its GID number.
If a number is manually assigned to a group entry, the server does not validate that the gidNumber is unique. It will allow duplicate IDs; this is expected (though discouraged) behavior for POSIX entries.
If two entries are assigned the same ID number, only the first entry is returned in a search for that ID number. However, both entries will be returned in searches for other attributes or with ipa group-find --all.

NOTE

You cannot edit the group name. The group name is the primary key, so changing it is the equivalent of deleting the group and creating a new one.

5.5.2. Adding Group Members

5.5.2.1. With the Web UI (Group Page)

NOTE

This procedure adds a user to a group. User groups can contain other user groups as their members. These are nested groups.
It can take up to several minutes for the members of the child group to show up as members of the parent group. This is especially true on virtual machines where the nested groups have more than 500 members.
When creating nested groups, be careful not to create recursive groups. For example, if GroupA is a member of GroupB, do not add GroupB as a member of GroupA. Recursive groups are not supported and can cause unpredictable behavior.
  1. Open the Identity tab, and select the User Groups subtab.
  2. Click the name of the group to which to add members.
  3. Click the Enroll link at the top of the task area.
  4. Click the checkbox by the names of the users to add, and click the right arrows button, >>, to move the names to the selection box.
  5. Click the Enroll button.
Group members can be users or other user groups. It can take up to several minutes for the members of the child group to show up as members of the parent group. This is especially true on virtual machines where the nested groups have more than 500 members.

5.5.2.2. With the Web UI (User's Page)

Users can also be added to a group through the user's page.
  1. Open the Identity tab, and select the Users subtab.
  2. Click the name of the user to edit.
  3. Open the User Groups tab on the user entry page.
  4. Click the Enroll link at the top of the task area.
  5. Click the checkbox by the names of the groups for the user to join, and click the right arrows button, >>, to move the groups to the selection box.
  6. Click the Enroll button.

5.5.2.3. With the Command Line

Members are added to a group using the group-add-member command. This command can add both users as group members and other groups as group members.
The syntax of the group-add-member command requires only the group name and a comma-separated list of users to add:
$ ipa group-add-member groupName [--users=list] [--groups=list]
For example, this adds three users to the engineering group:
$ ipa group-add-member engineering --users=jsmith,bjensen,mreynolds
  Group name: engineering
  Description: for engineers
  GID: 387115842
  Member users: jsmith,bjensen,mreynolds
-------------------------
Number of members added 3
-------------------------
Likewise, other groups can be added as members, which creates nested groups:
$ ipa group-add-member engineering --groups=dev,qe1,dev2
  Group name: engineering
  Description: for engineers
  GID: 387115842
  Member groups: dev,qe1,dev2
  -------------------------
  Number of members added 3
  -------------------------
When displaying nested groups, members are listed as members and the members of any member groups are listed as indirect members. For example:
$ ipa group-show examplegroup
  Group name: examplegroup
  Description: for examples
  GID: 93200002
  Member users: jsmith,bjensen,mreynolds
  Member groups: californiausers
  Indirect Member users: sbeckett,acalavicci
It can take up to several minutes for the members of the child group to show up as members of the parent group. This is especially true on virtual machines where the nested groups have more than 500 members.

NOTE

When creating nested groups, be careful not to create recursive groups. For example, if GroupA is a member of GroupB, do not add GroupB as a member of GroupA. Recursive groups are not supported and can cause unpredictable behavior.
A group member is removed using the group-remove-member command.
$ ipa group-remove-member engineering --users=jsmith

  Group name: engineering
  Description: for engineers
  GID: 855800009
  Member users: bjensen,mreynolds
---------------------------
Number of members removed 1
---------------------------

5.5.2.4. Viewing Direct and Indirect Members of a Group

User groups can contain other user groups as members. This is called a nested group. This also means that a group has two types of members:
  • Direct members, which are added explicitly to the group
  • Indirect members, which are members of the group because they are members of another user group which is a member of the group
The IPA web UI has an easy way to view direct and indirect members of a group. The members list is filtered by member type, and this can be toggled by selecting the Direct and Indirect radio buttons at the top right corner of the members list.
Indirect and Direct Members
Figure 5.1. Indirect and Direct Members

Being able to track indirect members makes it easier to assign group membership properly, without duplicating membership.

5.5.3. Deleting User Groups

When a user group is deleted, only the group is removed. The user accounts of group members (including nested groups) are not affected. Additionally, any access control delegations that apply to that group are removed.

WARNING

Deleting a group is immediate and permanent. If any group configuration (such as delegations) is required, it must be assigned to another group or a new group created.

5.5.3.1. With the Web UI

  1. Open the Identity tab, and select the User Groups subtab.
  2. Select the checkbox by the name of the group to delete.
  3. Click the Delete link at the top of the task area.
  4. When prompted, confirm the delete action.

5.5.3.2. With the Command Line

The group-del command to deletes the specified group. For example:
$ ipa group-del examplegroup

5.6. Searching for Users and Groups

The user searches in IPA can be run against simple (full word) or partial search strings. The range of attributes that are searched is configured as part of the default IPA configuration, as in Section 5.7, “Specifying Default User and Group Settings”.
By default, there are six attributes that are indexed for user searches and two that are indexed for group searches. These are listed in Table 5.4, “Default Search Attributes”. All search attributes are searched in a user/group search.
Table 5.4. Default Search Attributes
User Search Attributes
First name Last name
Login ID Job title
Organizational unit Phone number
Group Search Attributes
Name Description

The attributes which are searched in user and group searches can be changed, as described in Section 5.7.3, “Setting User Search Attributes” and Section 5.7.4, “Setting Group Search Attributes”.

5.6.1. With the UI

Both user and group main pages have a search bar in the upper right corner of the task area. This search box searches against all of the fields listed in Table 5.4, “Default Search Attributes”. Type in any string, even a single letter, and click the magnifying glass icon. The UI filters the displayed list to match the search string.

5.6.2. With the Command Line

Searches are simple:
$ ipa user-find|group-find string options
There are a few general rules with searches:
  • If there is no string, then the search returns every entry in IPA, up to the search limit.
  • With the command-line tools, only a single search string can be used for user and group searches. With the UI, multiple strings can be used.
  • Searches are case insensitive.
  • Search results are displayed alphabetically, with exact matches listed first, followed by partial matches.
  • Wildcards cannot be used in searches. The search string must include at least one character that appears in one of the indexed search fields.

TIP

If the desired entry is not listed, it is possible that the search hit the preset search size limit before the entry was found. Change the search record or time limits, as in Section 5.7.2, “Setting Default Search Limits”, to allow more entries to be returned.

5.7. Specifying Default User and Group Settings

Identity Management uses a template when it creates new entries.
For users, the template is very specific. Identity Management uses default values for several core attributes for IPA user accounts. These defaults can define actual values for user account attributes (such as the home directory location) or it can define the format of attribute values, such as the username length. These settings also define the object classes assigned to users.
For groups, the template only defines the assigned object classes.
These default definitions are all contained in a single configuration entry for the IPA server, cn=ipaconfig,cn=etc,dc=example,dc=com.
The configuration can be changed using the ipa config-mod command.
Table 5.5. Default User Parameters
Field Command-Line Option Descriptions
Maximum username length --maxusername Sets the maximum number of characters for usernames. The default value is eight.
Root for home directories --homedirectory Sets the default directory to use for user home directories. The default value is /home.
Default shell --defaultshell Sets the default shell to use for users. The default value is /bin/sh.
Default user group --defaultgroup Sets the default group to which all newly created accounts are added. The default value is ipausers, which is automatically created during the IPA server installation process.
Default e-mail domain --emaildomain Sets the email domain to use to create email addressed based on the new accounts. The default is the IPA server domain.
Search time limit --searchtimelimit Sets the maximum amount of time, in seconds, to spend on a search before the server returns results.
Search size limit --searchrecordslimit Sets the maximum number of records to return in a search.
User search fields --usersearch Sets the fields in a user entry that can be used as a search string. Any attribute listed has an index kept for that attribute, so setting too many attributes could affect server performance.
Group search fields --groupsearch Sets the fields in a group entry that can be used as a search string.
Certificate subject base Sets the base DN to use when creating subject DNs for client certificates. This is configured when the server is set up.
Default user object classes --userobjectclasses Sets a list of object classes that are used to create IPA user accounts.
Default group object classes --groupobjectclasses Sets a list of object classes that are used to create IPA group accounts.
Password expiration notification --pwdexpnotify Sets how long, in days, before a password expires for the server to send a notification.
Password plug-in features Sets the format of passwords that are allowed for users.

5.7.1. Viewing the Settings Configuration

5.7.1.1. From the Web UI

  1. Open the IPA Server tab.
  2. Select the Configuration subtab.
  3. The complete configuration entry is shown in three sections, one for all search limits, one for user templates, and one for group templates.

5.7.1.2. From the Command Line

The config-show command shows the current configuration which applies to all new user accounts. By default, only the most common attributes are displayed; use the --all option to show the complete configuration.
# ipa config-show --all

  dn: cn=ipaconfig,cn=etc,dc=example,dc=com
  Max. username length: 32
  Home directory base: /home
  Default shell: /bin/sh
  Default users group: ipausers
  Default e-mail domain for new users: example.com
  Search time limit: 2
  Search size limit: 100
  User search fields: uid,givenname,sn,telephonenumber,ou,title
  Group search fields: cn,description
  Enable migration mode: FALSE
  Certificate Subject base: O=EXAMPLE.COM
  Default group objectclasses: top, groupofnames, nestedgroup, ipausergroup, ipaobject
  Default user objectclasses: top, person, organizationalperson, inetorgperson, inetuser, posixaccount,
                              krbprincipalaux, krbticketpolicyaux, ipaobject
  Password Expiration Notification (days): 4
  Password plugin features: AllowNThash
  cn: ipaConfig
  objectclass: nsContainer, top, ipaGuiConfig, ipaConfigObject

5.7.2. Setting Default Search Limits

Search limits set caps on the number of records returned or the time spent searching when querying the database for user or group entries. There are two types of search limits: time limits and size (number) limits.
With the default settings, users are limited to two second searches and no more than 100 records returned per search.

IMPORTANT

Setting search size or time limits too high can negatively affect IPA server performance.

5.7.2.1. With the Web UI

  1. Open the IPA Server tab.
  2. Select the Configuration subtab.
  3. Scroll to the Search Options area.
  4. Change the search limit settings.
    • Search size limit, the maximum number of records to return in a search.
    • Search time limit, the maximum amount of time, in seconds, to spend on a search before the server returns results.

    TIP

    Setting the time limit or size limit value to -1 means that there are no limits on searches.
  5. When the changes are complete, click the Update link at the top of the Configuration page.

5.7.2.2. With the Command Line

The search limits can be changed using the config-mod command.
$ ipa config-mod --searchtimelimit=5 --searchrecordslimit=500

  Max. username length: 32
  Home directory base: /home
  Default shell: /bin/sh
  Default users group: ipausers
  Default e-mail domain for new users: rhts.eng.bos.redhat.com
  Search time limit: 5
  Search size limit: 50
  User search fields: uid,givenname,sn,telephonenumber,ou,title
  Group search fields: cn,description
  Enable migration mode: FALSE
  Certificate Subject base: O=EXAMPLE.COM
  Password Expiration Notification (days): 4

TIP

Setting the time limit or size limit value to -1 means that there are no limits on searches.

5.7.3. Setting User Search Attributes

A search for users or groups does not automatically search every possible attribute for that attribute. Rather, it searches a specific subset of attributes, and that list is configurable.
When adding attributes to the user or group search fields, make sure that there is a corresponding index within the LDAP directory for that attribute. Searches are performed based on indexes. Most standard LDAP attributes have indexes, but any custom attributes must have indexes created for them. Creating indexes is described in the indexes chapter in the Directory Server Administrator's Guide.

5.7.3.1. From the Web UI

  1. Open the IPA Server tab.
  2. Select the Configuration subtab.
  3. Scroll to the User Options area.
  4. Add any additional search attributes, in a comma-separated list, in the User search fields field.
  5. When the changes are complete, click the Update link at the top of the Configuration page.

5.7.3.2. From the Web UI

To change the search attributes, use the --usersearch option to set the attributes for user searches.
$ ipa config-mod --usersearch=uid,givenname,sn,telephonenumber,ou,title

NOTE

Always give the complete list of search attributes. Whatever values are passed with the configuration argument overwrite the previous settings.

5.7.4. Setting Group Search Attributes

A search for users or groups does not automatically search every possible attribute for that attribute. Rather, it searches a specific subset of attributes, and that list is configurable.
When adding attributes to the user or group search fields, make sure that there is a corresponding index within the LDAP directory for that attribute. Searches are performed based on indexes. Most standard LDAP attributes have indexes, but any custom attributes must have indexes created for them. Creating indexes is described in the indexes chapter in the Directory Server Administrator's Guide.

5.7.4.1. From the Web UI

  1. Open the IPA Server tab.
  2. Select the Configuration subtab.
  3. Scroll to the Group Options area.
  4. Add any additional search attributes, in a comma-separated list, in the Group search fields field.
  5. When the changes are complete, click the Update link at the top of the Configuration page.

5.7.4.2. From the Command Line

To change the search attributes, use the --groupsearch options to set the attributes for group searches.
$ ipa config-mod --groupsearch=cn,description

NOTE

Always give the complete list of search attributes. Whatever values are passed with the configuration argument overwrite the previous settings.

Chapter 6. Identity: Managing Hosts and Services

6.1. About Hosts, Services, and Machine Identity and Authentication
6.2. Adding Host Entries
6.2.1. Adding Host Entries from the Web UI
6.2.2. Adding Host Entries from the Command Line
6.3. Enrolling Clients Manually
6.3.1. Performing a Split Enrollment
6.3.2. Performing a Bulk or Kickstart Enrollment
6.4. Manually Unconfiguring Client Machines
6.5. Managing Services
6.5.1. Adding and Editing Service Entries and Keytabs
6.5.1.1. Adding Services and Keytabs from the Web UI
6.5.1.2. Adding Services and Keytabs from the Command Line
6.5.2. Adding Services and Certificates for Services
6.5.2.1. Adding Services and Certificates from the Web UI
6.5.2.2. Adding Services and Certificates from the Command Line
6.5.3. Storing Certificates in NSS Databases
6.5.4. Configuring Clustered Services
6.5.5. Using the Same Service Principal for Multiple Services
6.6. Disabling Host and Service Entries
6.7. Extending Access Permissions over Other Hosts and Services
6.7.1. Delegating Service Management
6.7.2. Delegating Host Management
6.7.3. Accessing Delegated Services
6.8. Renaming Machines and Reconfiguring IPA Client Configuration
6.9. Managing Host Groups
6.9.1. Creating Host Groups
6.9.1.1. Creating Host Groups from the Web UI
6.9.1.2. Creating Host Groups from the Command Line
6.9.2. Adding Group Members
6.9.2.1. Adding Group Members from the Web UI
6.9.2.2. Adding Group Members from the Command Line
6.10. Troubleshooting Host Problems
6.10.1. Certificate Not Found/Serial Number Not Found Errors
6.10.2. Debugging Client Connection Problems
Both DNS and Kerberos are configured as part of the initial client configuration. This is required because these are the two services that bring the machine within the IPA domain and allow it to identify the IPA server it will connect with. After the initial configuration, IPA has tools to manage both of these services in response to changes in the domain services, changes to the IT environment, or changes on the machines themselves which affect Kerberos, certificate, and DNS services, like changing the client hostname.
This chapter describes how to manage identity services that relate directly to the client machine:
  • DNS entries and settings
  • Machine authentication
  • Hostname changes (which affect domain services)

6.1. About Hosts, Services, and Machine Identity and Authentication

The basic function of an enrollment process is to create a host entry for the client machine in the IPA directory. This host entry is used to establish relationships between other hosts and even services within the domain. These relationships are part of delegating authorization and control to hosts within the domain.
A host entry contains all of the information about the client within IPA:
  • Service entries associated with the host
  • The host and service principal
  • Access control rules
  • Machine information, such as its physical location and operating system
Some services that run on a host can also belong to the IPA domain. Any service that can store a Kerberos principal or an SSL certificate (or both) can be configured as an IPA service. Adding a service to the IPA domain allows the service to request an SSL certificate or keytab from the domain. (Only the public key for the certificate is stored in the service record. The private key is local to the service.)
An IPA domain establishes a commonality between machines, with common identity information, common policies, and shared services. Any machine which belongs to a domain functions as a client of the domain, which means it uses the services that the domain provides. An IPA domain (as described in Section 1.2, “Bringing Linux Services Together”) provides three main services specifically for machines:
  • DNS
  • Kerberos
  • Certificate management
Machines are treated as another identity that is managed by IPA. Clients use DNS to identify IPA servers, services, and domain members — which, like user identities are stored in the 389 Directory Server instance for the IPA server. Like users, machines can be authenticated to the domain using Kerberos or certificates to verify the machine's identity.
From the machine perspective, there are several tasks that can be performed that access these domain services:
  • Joining the DNS domain (machine enrollment)
  • Managing DNS entries and zones
  • Managing machine authentication
Authentication in IPA includes machines as well as users. Machine authentication is required for the IPA server to trust the machine and to accept IPA connections from the client software installed on that machine. After authenticating the client, the IPA server can respond to its requests. IPA supports two different approaches to machine authentication:
  • Key tables (or keytabs, a symmetric key resembling to some extent a user password) and machine certificates. Kerberos tickets are generated as part of the Kerberos services and policies defined by the server. Initially granting a Kerberos ticket, renewing the Kerberos credentials, and even destroying the Kerberos session are all handled by the IPA services. Managing Kerberos is covered in Chapter 12, Policy: Managing the Kerberos Domain.
  • Machine certificates. In this case, the machine uses an SSL certificate that is issued by the IPA server's certificate authority and then stored in IPA's Directory Server. The certificate is then sent to the machine to present when it authenticates to the server. On the client, certificates are managed by a service called certmonger, which is described in Chapter 18, Working with certmonger.

6.2. Adding Host Entries

A host entry is always created when a client is configured. On Red Hat Enterprise Linux systems, this is done automatically with the ipa-client-install script. On other platforms — and in alternative enrollment scenarios, as in Section 6.3, “Enrolling Clients Manually” — the host entry is created manually.

6.2.1. Adding Host Entries from the Web UI

  1. Open the Identity tab, and select the Hosts subtab.
  2. Click the Add link at the top of the hosts list.
  3. Fill in the machine name and select the domain from the configured zones in the drop-down list. If the host has already been assigned a static IP address, then include that with the host entry so that the DNS entry is fully created.
    DNS zones can be created in IPA, which is described in Section 8.5, “Adding DNS Zones”. If the IPA server does not manage the DNS server, the zone can be entered manually in the menu area, like a regular text field.

    NOTE

    Select the Force checkbox to add the host DNS record, even if the hostname cannot be resolved.
    This is useful for hosts which use DHCP and do not have a static IP address. This essentially creates a placeholder entry in the IPA DNS service. When the DNS service dynamically updates its records, the host's current IP address is detected and its DNS record is updated.
  4. Click the Add and Edit button to go directly to the expanded entry page and fill in more attribute information. Information about the host hardware and physical location can be included with the host entry.

6.2.2. Adding Host Entries from the Command Line

Host entries are created using the host-add command. This commands adds the host entry to the IPA Directory Server. The full list of options with host-add are listed in Section B.4, “ipa Host Commands”. At its most basic, an add operation only requires the client hostname to add the client to the Kerberos realm and to create an entry in the IPA LDAP server:
$ ipa host-add client1.example.com
If the IPA server is configured to manage DNS, then the host can also be added to the DNS resource records using the --ip-address and --force options.
Example 6.1. Creating Host Entries with Static IP Addresses
$ ipa host-add --force --ip-address=192.168.166.31 client1.example.com

Commonly, hosts may not have a static IP address or the IP address may not be known at the time the client is configured. For example, laptops may be preconfigured as Identity Management clients, but they do not have IP addresses at the time they're configured. Hosts which use DHCP can still be configured with a DNS entry by using --force. This essentially creates a placeholder entry in the IPA DNS service. When the DNS service dynamically updates its records, the host's current IP address is detected and its DNS record is updated.
Example 6.2. Creating Host Entries with DHCP
$ ipa host-add --force client1.example.com

Host records are deleted using the host-del command. If the IPA domain uses DNS, then the --updatedns option also removes the associated records of any kind for the host from the DNS.
$ ipa host-del --updatedns client1.example.com

6.3. Enrolling Clients Manually

Enrolling machines as clients in the IPA domain is a two-part process. A host entry is created for the client (and stored in the 389 Directory Server instance), and then a keytab is created to provision the client.
Both parts are performed automatically by the ipa-client-install command. It is also possible to perform those steps separately; this allows for administrators to prepare machines and IPA in advance of actually configuring the clients. This allows more flexible setup scenarios, including bulk deployments.
When performing a manual enrollment, the host entry is created separately, and then enrollment is completed when the client script is run, which creates the requisite keytab.

NOTE

There are two ways to set the password. You can either supply your own or have IPA generate a random one.

6.3.1. Performing a Split Enrollment

There may be a situation where an administrator in one group is prohibited from creating a host entry and, therefore, from simply running the ipa-client-install command and allowing it to create the host. However, that administrator may have the right to run the command after a host entry exists. In that case, one administrator can create the host entry manually, then the second administrator can complete the enrollment by running the ipa-client-install command.
  1. An administrator creates the host entry, as described in Section 6.2, “Adding Host Entries”.
  2. The second administrator installs the IPA client packages on the machine, as in Section 3.3, “Configuring a Red Hat Enterprise Linux System as an IPA Client”.
  3. When the second administrator runs the setup script, he must pass his Kerberos password and username (principal) with the ipa-client-install command. For example:
    $ ipa-client-install -w secret -p admin2
  4. The keytab is generated on the server and provisioned to the client machine, so that the client machine is not able to connect to the IPA domain. The keytab is saved with root:root ownership and 0600 permissions.

6.3.2. Performing a Bulk or Kickstart Enrollment

Two variations of a split enrollment are a bulk enrollment and a kickstart enrollment. Combined, that allows automatic provisioning of multiple hosts or virtual machines. This requires pre-creating the hosts on the IPA server, with a predefined password that can be used to authenticate to complete the enrollment operation.
  1. An administrator creates the host entry, as described in Section 6.2, “Adding Host Entries”. Set a password to use for the bulk or automatic enrollment. For example:
    $ ipa host-add bulkserver.example.com --password=secret
    The password is set to expire after the first authentication attempt. After enrollment completes, the password expires and the host is authenticated using its keytab.
  2. Run the kickstart script, using the given bulk password. The kickstart script performs all of the tasks performed manually by the second administrator in Section 6.3.1, “Performing a Split Enrollment”:
    1. Kickstart installs the IPA packages.
    2. Kickstart runs the enrollment script, passing in the password.
    3. The enrollment script connects to the IPA server using the provided password and a bind DN derived from the machine name. It then authenticates using a simple bind over SSL.

6.4. Manually Unconfiguring Client Machines

A machine may need to be removed from one IPA domain and moved to another domain or a virtual machine may be copied. There are a number of different situations where an IPA client needs to be reconfigured. The easiest solution is to uninstall the client and then configure it afresh.
ipa-client-install --uninstall
If it is not possible to uninstall the client directly, then the IPA configuration can be manually removed from the virtual machine.

WARNING

When a machine is unenrolled, the procedure cannot be undone. The machine can only be enrolled again.
  1. Remove the old hostname from the main keytab. This can be done by removing every principal in the realm or by removing specific principals. For example, to remove all principals:
    $ ipa-rmkeytab -k /etc/krb5.keytab -r EXAMPLE.COM
    To remove specific principals:
    $ ipa-rmkeytab -k /etc/krb5.keytab -p host/server.example.com@EXAMPLE.COM
  2. Disable tracking in certmonger for every certificate. Each certificate must be removed from tracking individually.
    $ ipa-getcert stop-tracking -n Server-Cert -d /etc/pki/nssdb
    						
    $ ipa-getcert stop-tracking -n Server2-Cert -d /etc/pki/nssdb
    
  3. Remove the old host from the IPA DNS domain. While this is optional, it cleans up the old IPA entries associated with the system and allows it to be re-enrolled cleanly at a later time.
    $ ipa host-del server.example.com
  4. If the system should be re-added to a new IPA domain — such as a virtual machine which was moved from one location to another — then the system can be rejoined to IPA using the ipa-join command.
    $ ipa-join

6.5. Managing Services

6.5.1. Adding and Editing Service Entries and Keytabs

As with host entries, service entries for the host (and any other services on that host which will belong to the domain) must be added manually to the IPA domain. This is a two step process. First, the service entry must be created, and then a keytab must be created for that service which it will use to access the domain.
By default, Identity Management saves its HTTP keytab to /etc/httpd/conf/ipa.keytab.

NOTE

This keytab is used for the web UI. if a key were stored in ipa.keytab and that keytab file is delete, the IPA web UI will stop working, because the original key would also be deleted.
Similar locations can be specified for each service that needs to be made Kerberos aware. There is no specific location that must be used, but, when using ipa-getkeytab, you should avoid using /etc/krb5.keytab. This file should not contain service-specific keytabs; each service should have its keytab saved in a specific location and the access privileges (and possibly SELinux rules) should be configured so that only this service has access to the keytab.

6.5.1.1. Adding Services and Keytabs from the Web UI

  1. Open the Identity tab, and select the Services subtab.
  2. Click the Add link at the top of the services list.
  3. Select the service type from the drop-down menu, and give it a name.
  4. Select the hostname of the IPA host on which the service is running. The hostname is used to construct the full service principal name.
  5. Click the Add button to save the new service principal.
  6. Use the ipa-getkeytab command to generate and assign the new keytab for the service principal.
    # ipa-getkeytab -s server.example.com -p HTTP/server.example.com -k /etc/httpd/conf/krb5.keytab -e des-cbc-crc
    • The realm name is optional. The IPA server automatically appends the Kerberos realm for which it is configured. You cannot specify a different realm.
    • The hostname must resolve to a DNS A record for it to work with Kerberos. You can use the --force flag to force the creation of a principal should this prove necessary.
    • The -e argument can include a comma-separated list of encryption types to include in the keytab. This supersedes any default encryption type.

    WARNING

    Creating a new key resets the secret for the specified principal. This means that all other keytabs for that principal are rendered invalid.

6.5.1.2. Adding Services and Keytabs from the Command Line

  1. Create the service principal. The service is recognized through a name like service/FQDN:
    # ipa service-add serviceName/hostname
    For example:
    $ ipa service-add HTTP/server.example.com
    -------------------------------------------------------
    Added service "HTTP/server.example.com@EXAMPLE.COM"
    -------------------------------------------------------
      Principal: HTTP/server.example.com@EXAMPLE.COM
      Managed by: ipaserver.example.com
    
  2. Create the service keytab file. This is done using the ipa-getkeytab command. The command requires the Kerberos service principal (-p), the IPA server name (-s), the file to write (-k), and the encryption method (-e). Be sure to copy the keytab to the appropriate directory for the service.
    For example:
    # ipa-getkeytab -s server.example.com -p HTTP/server.example.com -k /etc/httpd/conf/krb5.keytab -e des-cbc-crc
    • The realm name is optional. The IPA server automatically appends the Kerberos realm for which it is configured. You cannot specify a different realm.
    • The hostname must resolve to a DNS A record for it to work with Kerberos. You can use the --force flag to force the creation of a principal should this prove necessary.
    • The -e argument can include a comma-separated list of encryption types to include in the keytab. This supersedes any default encryption type.

    WARNING

    The ipa-getkeytab command resets the secret for the specified principal. This means that all other keytabs for that principal are rendered invalid.

6.5.2. Adding Services and Certificates for Services

While services can use keytabs, some services require certificates for access. In that case, a service can be added (or modified) to include a certificate with its service entry.

6.5.2.1. Adding Services and Certificates from the Web UI

  1. Open the Identity tab, and select the Services subtab.
  2. Click the Add link at the top of the services list.
  3. Select the service type from the drop-down menu, and give it a name.
  4. Select the hostname of the IPA host on which the service is running. The hostname is used to construct the full service principal name.
  5. Click the Add and Edit button to go directly to the service entry page.
  6. Scroll to the bottom of the page, to the Service Certificate section.
  7. Click the New Certificate button to create the service certificate.

6.5.2.2. Adding Services and Certificates from the Command Line

  1. Create a certificate for the service. Be sure to copy the keytab to the appropriate directory for the service.
    For example:
    $ ipa cert-request --principal=HTTP/web.example.com example.csr

    TIP

    Use the --add option to create the service automatically when requesting the certificate.
    Alternatively, use the getcert command, which creates and manages the certificate through certmonger. The options are described more in Section 18.1, “Requesting a Certificate with certmonger” and .
    $ ipa-getcert request -d /etc/httpd/alias -n Server-Cert -K HTTP/client1.example.com -N 'CN=client1.example.com,O=EXAMPLE.COM'
  2. Create the service principal. The service is recognized through a name like service/FQDN:
    # ipa service-add serviceName/hostname --certificate="CSR"
    For example (this example shortens the certificate):
    $ ipa service-add HTTP/server.example.com --certificate="MIICbTCCAVUCAQ...IzSljdLMYNg=="
    
    -------------------------------------------------------
    Added service "HTTP/server.example.com@EXAMPLE.COM"
    -------------------------------------------------------
      Principal: HTTP/server.example.com@EXAMPLE.COM
      Managed by: ipaserver.example.com
    
    Include the complete certificate request in the --certificate option.

6.5.3. Storing Certificates in NSS Databases

When services use certificates, the certificates and keys can be stored in NSS databases (which may also be used by the services themselves, as well as Identity Management).
  1. Create the NSS databases.
    $ certutil -N -d /path/to/database/dir
  2. Request the certificate using certutil, an NSS tool.
    $ certutil -R -s "CN=client1.example.com,O=EXAMPLE.COM" -d /path/to/database/dir -a > example.csr
If the IPA domain is using Certificate System for its CA, only the CN of the subject name is used. With a self-signed CA, the subject must match the configured certificate subject base. The IPA server rejects requests with a subject base that differs from this value.

6.5.4. Configuring Clustered Services

The IPA server is not cluster aware. However, it is possible to configure a clustered service to be part of IPA by synchronizing Kerberos keys across all of the participating hosts and configuring services running on the hosts to respond to whatever names the clients use.
  1. Enroll all of the hosts in the cluster into the IPA domain.
  2. Create any service principals and generate the required keytabs.
  3. Collect any keytabs that have been set up for services on the host, including the host keytab at /etc/krb5.keytab.
  4. Use the ktutil command to produce a single keytab file that contains the contents of all of the keytab files.
    1. For each file, use the rkt command to read the keys from that file.
    2. Use the wkt command to write all of the keys which have been read to a new keytab file.
  5. Replace the keytab files on each host with the newly-created combined keytab file.
  6. At this point, each host in this cluster can now impersonate any other host.
  7. Some services require additional configuration to accommodate cluster members which do not reset hostnames when taking over a failed service.
    • For sshd, set GSSAPIStrictAcceptorCheck no in /etc/ssh/sshd_config.
    • For mod_auth_kerb, set KrbServiceName Any in /etc/httpd/conf.d/auth_kerb.conf.

NOTE

For SSL servers, the subject name or a subject alternative name for the server's certificate must appear correct when a client connects to the clustered host. If possible, share the private key among all of the hosts. If each cluster member contains a subject alternative name which includes the names of all the other cluster members will satisfy any client connection requirements.

6.5.5. Using the Same Service Principal for Multiple Services

Within a cluster, the same service principal can be used for multiple services, spread across different machines.
  1. Retrieve a service principal using the ipa-getkeytab command.
    # ipa-getkeytab -s kdc.example.com -p HTTP/server.example.com -k /etc/httpd/conf/krb5.keytab -e des-cbc-crc
  2. Either direct multiple servers or services to use the same file, or copy the file to individual servers as required.

6.6. Disabling Host and Service Entries

Active services and hosts can be accessed by other services, hosts, and users within the domain. There can be situations when it is necessary to remove a host or a service from activity. However, deleting a service or a host removes the entry and all the associated configuration, and it removes it permanently.
Disabling a host or service prevents domain users from access it without permanently removing it from the domain. This can be done by using the host-disable and service-disable commands.
For example, for a host:
$ ipa host-disable server.example.com
For a service, specify the principal rather than the hostname:
$ ipa service-disable http/server.example.com

6.7. Extending Access Permissions over Other Hosts and Services

As discussed in Section 1.3, “Relationships Between Servers and Clients”, within the IPA domain, manage means being able to retrieve a keytab and certificates for another host or service. Every host and service has a managedby entry which lists what hosts or services can manage it. By default, a host can manage itself and all of its services. It is also possible to allow a host to manage other hosts, or services on other hosts, by updating the appropriate delegations or providing a suitable managedby entry.
An IPA service can be managed from any IPA host, as long as that host has been granted, or delegated, permission to access the service. Likewise, hosts can be delegated permissions to other hosts within the domain.
Host and Service Delegation
Figure 6.1. Host and Service Delegation

NOTE

If a host is delegated authority to another host through a managedBy entry, it does not mean that the host has also been delegated management for all services on that host. Each delegation has to be performed independently.

6.7.1. Delegating Service Management

A host is delegated control over a service using the service-add-host command. There are two parts to delegating the service: specifying the principal and identifying the hosts (in a comma-separated list) with control:
# ipa service-add-host principal --hosts=hostnames
For example:
# ipa service-add-host http/web.example.com --hosts=client1.example.com
Once the host is delegated authority, the host principal can be used to manage the service:
# kinit -kt /etc/krb5.keytab host/`hostname`
# ipa-getkeytab -s `hostname` -k /tmp/test.keytab -p http/web.example.com
Keytab successfully retrieved and stored in: /tmp/test.keytab
To create a ticket for this service, create a certificate request on the host with the delegated authority and use the cert-request command to create a service entry and load the certification information:
# ipa cert-request --add --principal=http/web.example.com web.csr
  Certificate: MIICETCCAXqgA...[snip]
  Subject: CN=web.example.com,O=EXAMPLE.COM
  Issuer: CN=EXAMPLE.COM Certificate Authority
  Not Before: Tue Feb 08 18:51:51 2011 UTC
  Not After: Mon Feb 08 18:51:51 2016 UTC
  Fingerprint (MD5): c1:46:8b:29:51:a6:4c:11:cd:81:cb:9d:7c:5e:84:d5
  Fingerprint (SHA1):
  01:43:bc:fa:b9:d8:30:35:ee:b6:54:dd:a4:e7:d2:11:b1:9d:bc:38
  Serial number: 1005

6.7.2. Delegating Host Management

Hosts are delegated authority over other hosts through the host-add-managedby command. This creates a managedby entry. Once the managedby entry is created, then the host can retrieve a keytab for the host it has delegated authority over.
  1. Log in as the admin user.
    # kinit admin
  2. Add the managedby entry. For example, this delegates authority over client2 to client1.
    # ipa host-add-managedby client2.example.com --hosts=client1.example.com
  3. Obtain a ticket as the host client1 and then retrieve a keytab for client2:
    # kinit -kt /etc/krb5.keytab host/`hostname`
    # ipa-getkeytab -s `hostname` -k /tmp/client2.keytab -p host/client2.example.com
    Keytab successfully retrieved and stored in: /tmp/client2.keytab

6.7.3. Accessing Delegated Services

For both services and hosts, if a client has delegated authority, it can obtain a keytab for that principal on the local machine. For services, this has the format service/hostname@REALM. For hosts, the service is host.
With kinit, use the -k option to load a keytab and the -t option to specify the keytab.
For example, to access a host:
# kinit -kt /etc/krb5.keytab host/ipa.example.com@EXAMPLE.COM
To access a service:
# kinit -kt /etc/httpd/conf/krb5.keytab http/ipa.example.com@EXAMPLE.COM

6.8. Renaming Machines and Reconfiguring IPA Client Configuration

The hostname of a system is critical for the correct operation of Kerberos and SSL. Both of these security mechanisms rely on the hostname to ensure that communication is occurring between the specified hosts. Infrastructures which use virtual machines or clustered servers will commonly have hosts which are renamed because systems are copied, moved, or renamed.
Red Hat Enterprise Linux does not provide a simple rename command to facilitate the renaming of an IPA host. Renaming a host in an IPA domain involves deleting the entry in IPA, uninstalling the client software, changing the hostname, and re-enrolling using the new name. Additionally, part of renaming hosts requires regenerating service principals.
To reconfigure the client:
  1. Identify which services are running on the machine. These need to be re-created when the machine is re-enrolled.
    # ipa service-find server.example.com
    Each host has a default service which does not appear in the list of services. This service can be referred to as the "host service". The service principal for the host service is host/<hostname>, such as host/server.example.com. This principal can also be referred to as the host principal.
  2. Identify all host groups to which the machine belongs.
    # ipa hostgroup-find server.example.com
    Identify which of the services have certificates associated with them. This can be done using the ldapsearch command to check the entries in the IPA LDAP database directly:
    # ldapsearch -x -b "cn=accounts,dc=example,dc=com" "(&(objectclass=ipaservice)(userCertificate=*))" krbPrincipalName
  3. For any service principals (in addition to the host principal), determine the location of the corresponding keytabs on server.example.com. The keytab location is different for each service, and IPA does not store this information.
    Each service on the client system has a Kerberos principal in the form service name/hostname@REALM, such as ldap/server.example.com@EXAMPLE.COM.
  4. Unenroll the client machine from the IPA domain:
    # ipa-client-install --uninstall
  5. For each identified keytab other than /etc/krb5.keytab, remove the old principals:
    # ipa-rmkeytab -k /path/to/keytab -r EXAMPLE.COM
  6. On another IPA machine, as an IPA administrator, remove the host entry. This removes all services and revokes all certificates issued for that host:
    # ipa host-del server.example.com
    At this point, the host is completely removed from IPA.
  7. Rename the machine.
  8. Re-enroll the system with IPA:
    # ipa-client-install
    This generates a host principal for with the new hostname in /etc/krb5.keytab.
  9. For every service that needs a new keytab, run the following command:
    # ipa service-add serviceName/new-hostname
  10. To generate certificates for services, use either certmonger or the IPA administration tools.
  11. Re-add the host to any applicable host groups.

6.9. Managing Host Groups

Host groups are a way of centralizing control over important management tasks, particularly access control.
All groups in Identity Management are essentially static groups, meaning that the members of the group are manually and explicitly added to the group. Tangentially, IPA allows nested groups, where a group is a member of another group. In that case, all of the group members of the member group automatically belong to the parent group, as well.
Because groups are easy to create, it is possible to be very flexible in what groups to create and how they are organized. Groups can be defined around organizational divisions like departments, physical locations, or IPA or infrastructure usage guidelines for access controls.

6.9.1. Creating Host Groups

6.9.1.1. Creating Host Groups from the Web UI

  1. Open the Identity tab, and select the Host Groups subtab.
  2. Click the Add link at the top of the groups list.
  3. Enter the name and a description for the group.
  4. Click the Add and Edit button to go immediately to the member selection page.

6.9.1.2. Creating Host Groups from the Command Line

New groups are created using the hostgroup-add command. (This adds only the group; members are added separately.)
Two attributes are always required: the group name and the group description. If those attributes are not given as arguments, then the script prompts for them.
$ ipa hostgroup-add groupName --desc="description"

6.9.2. Adding Group Members

6.9.2.1. Adding Group Members from the Web UI

  1. Open the Identity tab, and select the Host Groups subtab.
  2. Click the name of the group to which to add members.
  3. Click the Enroll link at the top of the task area.
  4. Click the checkbox by the names of the hosts to add, and click the right arrows button, >>, to move the hosts to the selection box.
  5. Click the Enroll button.

6.9.2.2. Adding Group Members from the Command Line

Members are added to a host group using the hostgroup-add-member command. This command can add both hosts as group members and other groups as group members.
The syntax of the hostgroup-add-member command requires only the group name and a comma-separated list of hosts to add:
$ ipa hostgroup-add-member groupName [--hosts=list] [--hostgroups=list]
For example, this adds three hosts to the caligroup group:
$ ipa hostgroup-add-member caligroup --hosts=ipaserver.example.com,client1.example.com,client2.example.com
  Group name: caligroup
  Description: for machines in california
  GID: 387115842
  Member hosts: ipaserver.example.com,client1.example.com,client2.example.com
-------------------------
Number of members added 3
-------------------------
Likewise, other groups can be added as members, which creates nested groups:
$ ipa hostgroup-add-member caligroup --groups=mountainview,sandiego
  Group name: caligroup
  Description: for machines in california
  GID: 387115842
  Member groups: mountainview,sandiego
  -------------------------
  Number of members added 2
  -------------------------

6.10. Troubleshooting Host Problems

6.10.1. Certificate Not Found/Serial Number Not Found Errors

The IPA information is stored in a separate LDAP directory than the certificate information, and these two LDAP databases are replicated separately. It is possible for a replication agreement to be broken for one directory and working for another, which can cause problems with managing clients.
Specifically, if the replication agreement between the two CA databases is broken, then a server may not be able to find certificate information about a valid IPA client, causing certificate errors:
Certificate operation cannot be completed: EXCEPTION (Certificate serial number 0x2d not found)
For example, an IPA server and replica have a function replication agreement between their IPA databases, but the replication agreement between their CA databases is broken. If a host is created on the server, the host entry is replicated over to the replica — but the certificate for that host is not replicated. The replica is aware of the client, but any management operations for that client will fail because the replica doesn't have a copy of its certificate.

6.10.2. Debugging Client Connection Problems

Client connection problems are apparent immediately. This can mean that users cannot log into a machine or attempts to access user and group information fails (for example, getent passwd admin).
Authentication in IPA is managed with the SSSD daemon, which is described in the Red Hat Enterprise Linux Deployment Guide. If there are problems with client authentication, then check the SSSD information.
First, check the SSSD logs in /var/log/sssd/. There is a specific log file for the DNS domain, such as sssd_example.com.log. If there is not enough information in the logs at the default logging level, then increase the log level.
To increase the log level:
  1. Open the sssd.conf file.
    vim /etc/sssd/sssd.conf
  2. In the [domain/example.com] section, set debug_level.
    debug_level = 9
  3. Restart the sssd daemon.
    service sssd restart
  4. Check the /var/log/sssd/sssd_example.com.log file for the debug messages.

Chapter 7. Identity: Integrating with Microsoft Active Directory

Identity Management uses active synchronization to integrate user data stored in an Active Directory domain and the user data stored in the IPA domain. Critical user attributes, including passwords, are synchronized between the services.
The capability to sync Active Directory and IPA domains is inherent when an IPA server is first installed. The synchronization process is configured by creating agreements between the IPA server and the Active Directory domain controller.
This chapter describes how to configure synchronization, how to configure Active Directory for integration with IPA, and how to configure Windows systems within the Active Directory domain to be aware of the IPA domain.

7.1. About Active Directory and Identity Management

Within the IPA domain, information is shared among servers and replicas by copying that information, reliably and predictably, between the data masters (servers) and other data masters. This process is replication.
A similar process can be used to share data between the IPA domain and a Microsoft Active Directory domain. This is synchronization.

7.1.1. About Active Directory Synchronization

Synchronization is the process of copying data back and forth between Active Directory and Identity Management.
Synchronization is defined in an agreement between an IPA server and an Active Directory domain controller. The sync agreement defines all of the information required to identify sync-able user entries (like the subtree to synchronize and requisite object classes in the user entries) as well as defining how account attributes are handled. The sync agreements are created with default values which can be tweaked to meet the needs of a specific domain. When two servers are involved in synchronization, they are called peers.
Synchronization is most commonly bi-directional. Information is sent back and forth between the IPA domain and the Windows domain in a process that is very similar to how IPA servers and replicas share information among themselves. It is possible to configure synchronization — or certain data areas — to only sync one way. That is uni-directional synchronization.
To prevent the risk of data conflicts, synchronization is configured between one Identity Management server and one Active Directory domain controller. The Identity Management server propagates changes back to the IPA domain, while the domain controller propagates changes back to the Windows domain.
There are some key features to IPA synchronization:
  • A synchronization operation runs every five minutes.
  • Synchronization can only be configured with one Active Directory domain. Multiple domains are not supported.
  • Synchronization can only be configured with one Active Directory domain controller. However, it is possible to have a list of failover Active Directory domain controllers. Likewise, there can be a list of failover IPA servers to keep synchronization uninterrupted.
  • Only user information is synchronized.
  • Both user attributes and passwords can be synchronized.
  • While modifications are bi-directional (going both from Active Directory to IPA and from IPA to Active Directory), new accounts are only uni-directional. New accounts created in Active Directory are synchronized over to IPA. However, user accounts created in IPA must also be added in Active Directory before they will be synchronized.
  • Account lock information is synchronized by default, so a user account which is disabled in one domain is disabled in the other.
  • Password synchronization changes take effect immediately.
When Active Directory users are synchronized over to IPA, certain attributes (including Kerberos and POSIX attributes) will have IPA attributes are automatically added to the user entries. These attributes are used by IPA within its domain. They are not synchronized back over the corresponding Active Directory user entry.
Some of the data in synchronization can be modified as part of the synchronization process. For examples, certain attributes can be automatically added to Active Directory user accounts when they are synced over to the IPA domain. These attribute changes are defined as part of the synchronization agreement and are described in Section 7.3.3, “Changing the Behavior for Syncing User Account Attributes”.

7.1.2. Attributes Which Are Synchronized

Identity Management synchronizes a subset of user attributes between IPA and Active Directory user entries. Any other attributes present in the entry, either in Identity Management or in Active Directory, are ignored by synchronization.

NOTE

Most POSIX attributes are not synchronized.
Although there are significant schema differences between the Active Directory LDAP schema and the 389 Directory Server LDAP schema used by Identity Management, there are many attributes that are the same. These attributes are simply synchronized between the Active Directory and IPA user entries, with no changes to the attribute name or value format.
Table 7.1. User Schema That Are the Same in Identity Management and Windows Servers
cn[a] physicalDeliveryOfficeName
description postOfficeBox
destinationIndicator postalAddress
facsimileTelephoneNumber postalCode
givenname registeredAddress
homePhone sn
homePostalAddress st
initials street
l telephoneNumber
mail teletexTerminalIdentifier
mobile telexNumber
o title
ou usercertificate
pager x121Address
[a] The cn is treated differently than other synced attributes. It is mapped directly (cn to cn) when syncing from Identity Management to Active Directory. When syncing from Active Directory to Identity Management, however, cn is mapped from the name attribute on Windows to the cn attribute in Identity Management.

Some attributes have different names but still have direct parity between IPA (which uses 389 Directory Server) and Active Directory. These attributes are mapped by the synchronization process.
Table 7.2. User Schema Mapped between Identity Management and Active Directory
Identity Management Active Directory
cn[a] name
nsAccountLock userAccountControl
ntUserDomainId sAMAccountName
ntUserHomeDir homeDirectory
ntUserScriptPath scriptPath
ntUserLastLogon lastLogon
ntUserLastLogoff lastLogoff
ntUserAcctExpires accountExpires
ntUserCodePage codePage
ntUserLogonHours logonHours
ntUserMaxStorage maxStorage
ntUserProfile profilePath
ntUserParms userParameters
ntUserWorkstations userWorkstations
[a] The cn is mapped directly (cn to cn) when syncing from Identity Management to Active Directory. When syncing from Active Directory cn is mapped from the name attribute in Active Directory to the cn attribute in Identity Management.

7.1.3. User Schema Differences between Identity Management and Active Directory

Even though attributes may be successfully synced between Active Directory and IPA, there may still be differences in how Active Directory and Identity Management define the underlying X.500 object classes. This could lead to differences in how the data are handled in the different LDAP services.
This section describes the differences in how Active Directory and Identity Management handle some of the attributes which can be synchronized between the two domains.

7.1.3.1. Values for cn Attributes

In 389 Directory Server, the cn attribute can be multi-valued, while in Active Directory this attribute must have only a single value. When the Identity Management cn attribute is synchronized, then, only one value is sent to the Active Directory peer.
What this means for synchronization is that,potentially, if a cn value is added to an Active Directory entry and that value is not one of the values for cn in Identity Management, then all of the Identity Management cn values are overwritten with the single Active Directory value.
One other important difference is that Active Directory uses the cn attribute attribute as its naming attribute, where Identity Management uses uid. This means that there is the potential to rename the entry entirely (and accidentally) if the cn attribute is edited in the Identity Management. If that cn change is written over to the Active Directory entry, then the entry is renamed, and the new named entry is written back over to Identity Management.

7.1.3.2. Values for street and streetAddress

Active Directory uses the attribute streetAddress for a user or group's postal address; this is the way that 389 Directory Server uses the street attribute. There are two important differences in the way that Active Directory and Identity Management use the streetAddress and street attributes, respectively:
  • In 389 Directory Server, streetAddress is an alias for street. Active Directory also has the street attribute, but it is a separate attribute that can hold an independent value, not an alias for streetAddress.
  • Active Directory defines both streetAddress and street as single-valued attributes, while 389 Directory Server defines street as a multi-valued attribute, as specified in RFC 4519.
Because of the different ways that 389 Directory Server and Active Directory handle streetAddress and street attributes, there are two rules to follow when setting address attributes in Active Directory and Identity Management:
  • The synchronization process maps streetAddress in the Active Directory entry to street in Identity Management. To avoid conflicts, the street attribute should not be used in Active Directory.
  • Only one Identity Management street attribute value is synced to Active Directory. If the streetAddress attribute is changed in Active Directory and the new value does not already exist in Identity Management, then all street attribute values in Identity Management are replaced with the new, single Active Directory value.

7.1.3.3. Constraints on the initials Attribute

For the initials attribute, Active Directory imposes a maximum length constraint of six characters, but 389 Directory Server does not have a length limit. If an initials attribute longer than six characters is added to Identity Management, the value is trimmed when it is synchronized with the Active Directory entry.

7.2. Setting up Active Directory for Synchronization

Synchronizing user accounts alone is enabled within IPA, so all that is necessary is to set up a sync agreement (Section 7.3.2, “Creating Synchronization Agreements”). On the Windows server, it is necessary to create the user that the IPA server will use to connect to the Active Directory domain.
The process for creating a user in Active Directory is covered in the Windows server documentation at http://technet.microsoft.com/en-us/library/cc732336.aspx. The new user account must have the proper permissions:
  • Grant the sync user account Replicating directory changes rights to the synchronized Active Directory subtree. Replicator rights are required for the sync user to perform synchronization operations.
    Replicator rights are described in http://support.microsoft.com/kb/303972.
  • Add the sync user as a member of the Account Operator and Enterprise Read-Only Domain controller groups. It is not necessary for the user to belong to the full Domain Admin group.

7.3. Managing Synchronization Agreements

7.3.1. Trusting the Active Directory and IPA CA Certificates

Both Active Directory and Identity Management use certificates for server authentication. For the Active Directory and IPA SSL server certificates to be trusted by each other, both servers need to trust the CA certificate for the CA which issued those certificates. This means that the Active Directory CA certificate needs to be imported into the IPA database, and the IPA CA certificate needs to be imported into the Active Directory database.
  1. Export the Active Directory CA certificate.
    1. In My Network Places, open the CA distribution point. For example, the location on Windows Server 2003 is C:\WINDOWS\system32\certsrv\CertEnroll\.
    2. Double-click the security certificate file (.crt file) to display the Certificate dialog box.
    3. On the Details tab, click Copy to File to start the Certificate Export Wizard.
    4. Click Next, and then select Base-64 encoded X.509 (.CER).
    5. Specify a suitable directory and file name for the exported file. Click Next to export the certificate, and then click Finish.
  2. Copy the Active Directory certificate over to the IPA server machine.
  3. Download the IPA server's CA certificate from http://ipa.example.com/ipa/config/ca.crt.
  4. Copy both the Active Directory CA certificate and the IPA CA certificate into the /etc/openldap/cacerts/ directory.
  5. Update the hash symlinks for the certificates.
    cacertdir_rehash /etc/openldap/cacerts/
  6. Edit the /etc/openldap/ldap.conf file, and add the information to point to and use the certificates in the /etc/openldap/cacerts/ directory.
    TLS_CACERTDIR /etc/openldap/cacerts/
    TLS_REQCERT allow

7.3.2. Creating Synchronization Agreements

Synchronization agreements are created on the IPA server using the ipa-replica-manage connect command because it creates a connection to the Active Directory domain. The options to create the synchronization agreement are listed in Table 7.3, “Synchronization Agreement Options”.
  1. Make sure that the Active Directory and IPA servers trust each other's CA certificates, as in Section 7.3.1, “Trusting the Active Directory and IPA CA Certificates”.
  2. Remove any existing Kerberos credentials on the IPA server.
    $ kdestroy
  3. Use the ipa-replica-manage command to create a Windows synchronization agreement. This requires the --winsync option. If passwords will be synchronized as well as user accounts, then also use the --passsync option and set a password to use for Password Sync.
    The --binddn and--bindpwd options give the username and password of the system account on the Active Directory server that IPA will use to connect to the Active Directory server.
    $ ipa-replica-manage connect --winsync 
    	--binddn cn=administrator,cn=users,dc=example,dc=com 
    	--bindpw Windows-secret 
    	--passsync secretpwd 
    	--cacert /etc/openldap/cacerts/windows.cer  
    	adserver.example.com -v
  4. When prompted, enter the Directory Manager password.
  5. Optional. Configure Password Synchronization, as in Section 7.4.2, “Setting up Password Synchronization”.
Table 7.3. Synchronization Agreement Options
Option Description
--winsync Identifies this as a synchronization agreement.
--binddn Gives the full user DN of the synchronization identity. This is the user DN that the IPA LDAP server uses to bind to Active Directory. This user must exist in the Active Directory domain and must have replicator, read, search, and write permissions on the Active Directory subtree.
--bindpw Gives the password for the sync user.
--passsync Gives the password for the Windows user account which is involved in synchronization.
--cacert Gives the full path and file name of the Active Directory CA certificate. This certificate is exported in Section 7.3.1, “Trusting the Active Directory and IPA CA Certificates”.
--win-subtree Gives the DN of the Windows subtree containing the users to synchronize. The default value is cn=Users,$SUFFIX.
AD_server_name Gives the hostname of the Active Directory domain controller.

7.3.3. Changing the Behavior for Syncing User Account Attributes

When the sync agreement is created, it has certain default behaviors defined for how the synchronization process handled the user account attributes during synchronization. The types of behaviors are things like how to handle lockout attributes or how to handle different DN formats. This behavior can be changed by editing the synchronization agreement. The list of attribute-related parameters are in Table 7.4, “Synced Attribute Settings”.
The sync agreement exists as a special plug-in entry in the LDAP server and each attribute behavior is set through an LDAP attribute. To change the sync behavior, use the ldapmodify command to modify the LDAP server entry directly.
For example, account lockout attributes are synchronized between IPA and Active Directory by default, but this can be disabled by editing the ipaWinSyncAcctDisable attribute. (Changing this means that if an account is disabled in Active Directory, it is still active in IPA and vice versa.)
$ ldapmodify -x -D "cn=directory manager" -w password

dn: cn=ipa-winsync,cn=plugins,cn=config
changetype: modify
replace: ipaWinSyncAcctDisable
ipaWinSyncAcctDisable: none

modifying entry "cn=ipa-winsync,cn=plugins,cn=config"
Table 7.4. Synced Attribute Settings
Parameter Description Possible Values
General User Account Parameters  
ipaWinSyncNewEntryFilter Sets the search filter to use to find the entry which contains the list of object classes to add to new user entries. The default is (cn=ipaConfig).
ipaWinSyncNewUserOCAttr Sets the attribute in the configuration entry which actually contains the list of object classes to add to new user entries. The default is ipauserobjectclasses.
ipaWinSyncHomeDirAttr Identifies which attribute in the entry contains the default location of the POSIX home directory. The default is ipaHomesRootDir.
ipaWinSyncUserAttr Sets an additional attribute with a specific value to add to Active Directory users when they are synced over from the Active Directory domain. If the attribute is multi-valued, then it can be set multiple times, and the sync process adds all of the values to the entry.

NOTE

This only sets the attribute value if the entry does not already have that attribute present. If the attribute is present, then the entry's value is used when the Active Directory entry is synced over.
ipaWinSyncUserAttr: attributeName attributeValue
ipaWinSyncUserFlatten Sets whether to normalize the DN of Active Directory entries to conform with the IPA directory structure. In IPA, all users are stored under the cn=users,cn=accounts,$SUFFIX entry, but Active Directory can have more branches in its directory, which can result in DNs like cn=John Smith,ou=Development,ou=Engineering,cn=users,dc=example,dc=com. Flattening the DN discards any additional intervening organizational units in the Active Directory DN and creating a simple DN on the IPA side.
Any ou attributes are stored in the IPA user entry.
true | false
ipaWinSyncForceSync Sets whether to check existing IPA users which match an existing Active Directory user should be automatically edited so they can be synchronized. If an IPA user account has a uid parameter which is identical to the samAccountName in an existing Active Directory user, then that account is not synced by default. This attribute tells the sync service to add the ntUser and ntUserDomainId to the IPA user entries automatically, which allows them to be synchronized. true | false
User Account Lock Parameters  
ipaWinSyncAcctDisable Sets which way to synchronize account lockout attributes. It is possible to control which account lockout settings are in effect. For example, to_ad means that when account lockout attribute is set in IPA, its value is synced over to Active Directory and overrides the local Active Directory value. By default, account lockout attributes are synced from both domains.
  • both (default)
  • to_ad
  • to_ds
  • none
ipaWinSyncInactivatedFilter Sets the search filter to use to find the DN of the group used to hold inactivated (disabled) users. This does not need to be changed in most deployments. The default is (&(cn=inactivated)(objectclass=groupOfNames)).
ipaWinSyncActivatedFilter Sets the search filter to use to find the DN of the group used to hold activate users. This does not need to be changed in most deployments. The default is (&(cn=activated)(objectclass=groupOfNames)).
Group Parameters  
ipaWinSyncDefaultGroupAttr Sets the attribute in the new user account to reference to see what the default group for the user is. The group name in the entry is then used to find the gidNumber for the user account. The default is ipaDefaultPrimaryGroup.
ipaWinSyncDefaultGroupFilter Sets the search filter to map the group name to the POSIX gidNumber. The default is (&(gidNumber=*)(objectclass=posixGroup)(cn=groupAttr_value)).
Realm Parameters  
ipaWinSyncRealmAttr Sets the attribute which contains the realm name in the realm entry. The default is cn.
ipaWinSyncRealmFilter Sets the search filter to use to find the entry which contains the IPA realm name. The default is (objectclass=krbRealmContainer).

7.3.4. Changing the Synchronized Windows Subtree

Creating a synchronization agreement automatically sets the two subtrees to use as the synchronized user database. In IPA, the default is cn=users,cn=accounts,$SUFFIX, and for Active Directory, the default is CN=Users,$SUFFIX.
The value for the Active Directory subtree can be set to a non-default value when the sync agreement is created by using the --win-subtree option. After the agreement is created, the Active Directory subtree can be changed by using the ldapmodify command to edit the nsds7WindowsReplicaSubtree value in the sync agreement entry.
For example:
$ ldapmodify -x -D "cn=directory manager" -w password

dn: cn=ipa-winsync,cn=plugins,cn=config
changetype: modify
replace: nsds7WindowsReplicaSubtree
nsds7WindowsReplicaSubtree: CN=People,DC=example,DC=com

modifying entry "cn=ipa-winsync,cn=plugins,cn=config"

7.3.5. Deleting Synchronization Agreements

Synchronization can be stopped by deleting the sync agreement which disconnects the IPA and Active Directory servers. In the inverse of creating a sync agreement, deleting a sync agreement uses the ipa-replica-manage disconnect command and then the hostname of the Active Directory server.
  1. Delete the sync agreement.
    # ipa-replica-manage disconnect adserver.example.com
  2. Remove the Active Directory CA certificate from the IPA server database:
    # certutil -D -d /etc/dirsrv/slapd-EXAMPLE.COM/ -n "Imported CA"

7.3.6. Winsync Agreement Failures

Creating the sync agreement fails because it cannot connect to the Active Directory server.
One of the most common sync agreement failures is that the IPA server cannot connect to the Active Directory server:
"Update failed! Status: [81  - LDAP error: Can't contact LDAP server]
This can occur if the wrong Active Directory CA certificate was specified when the agreement was created. This creates duplicate certificates in the IPA LDAP database (in the /etc/dirsrv/slapd-DOMAIN/ directory) with the name Imported CA. This can be checked using certutil:
$ certutil -L -d /etc/dirsrv/slapd-DOMAIN/

Certificate Nickname                                         Trust Attributes
SSL,S/MIME,JAR/XPI

CA certificate                                               CTu,u,Cu
Imported CA                                                  CT,,C
Server-Cert                                                  u,u,u
Imported CA                                                  CT,,C
To resolve this issue, clear the certificate database:
# certutil -d /etc/dirsrv/slapd-DOMAIN-NAME -D -n "Imported CA"
This deletes the CA certificate from the LDAP database.
There are errors saying passwords aren't being synced because it says the entry exists
For some entries in the user database, there may be an informational error message that the password is not being reset because the entry already exists:
"Windows PassSync entry exists, not resetting password"
This is not an error. This message occurs when an exempt user, the Password Sync user, it not being changed. The Password Sync user is the operational user which is used by the service to change the passwords in IPA.

7.4. Managing Password Synchronization

Password synchronization is configured separately from Windows Synchronization.

7.4.1. Setting up the Windows Server for Password Synchronization

To synchronize passwords requires that Active Directory be running in SSL and that the Password Sync Service be installed on each Active Directory domain controller. The Password Sync Service records password changes and synchronizes them, over a secure connection, to the IPA entry.

TIP

Install the Microsoft Certificate System in Enterprise Root Mode. Active Directory will then automatically enroll to retrieve its SSL server certificate.
  1. Make sure that the Active Directory password complexity policies are enabled so that the Password Sync service will run.
    1. Run secpol.msc from the command line.
    2. Select Security Settings.
    3. Open Account Policies, and then open Password Policy.
    4. Enable the Password must meet complexity requirements option and save.
  2. If SSL is not already enabled, set up SSL on the Active Directory server. Setting up LDAPS is explained in more detail in the Microsoft knowledgebase at http://support.microsoft.com/kb/321051.
    1. Install a certificate authority in the Windows Components section in Add/Remove Programs.
    2. Select the Enterprise Root CA option.
    3. Reboot the Active Directory server. If IIS web services are running, the CA certificate can be accessed by opening http://servername/certsrv.
    4. Set up the Active Directory server to use the SSL server certificate.
      1. Create a certificate request .inf, using the fully-qualified domain name of the Active Directory as the certificate subject. For example:
        ;----------------- request.inf ----------------- 
        
        [Version] 
        
        Signature="$Windows NT$ 
        
        [NewRequest]
        
        Subject = "CN=ad.server.example.com, O=Engineering, L=Raleigh, S=North Carolina, C=US"
        KeySpec = 1 
        KeyLength = 2048 
        Exportable = TRUE 
        MachineKeySet = TRUE 
        SMIME = False 
        PrivateKeyArchive = FALSE 
        UserProtected = FALSE 
        UseExistingKeySet = FALSE 
        ProviderName = "Microsoft RSA SChannel Cryptographic Provider" 
        ProviderType = 12
        RequestType = PKCS10 
        KeyUsage = 0xa0 
        
        [EnhancedKeyUsageExtension] 
        
        OID=1.3.6.1.5.5.7.3.1 
        
        ;-----------------------------------------------
        For more information on the .inf request file, see the Microsoft documentation, such as http://technet.microsoft.com/en-us/library/cc783835.aspx.
      2. Generate the certificate request.
        certreq -new request.inf request.req
      3. Submit the request to the Active Directory CA. For example:
        certreq -submit request.req certnew.cer

        NOTE

        If the command-line tool returns an error message, then use the Web browser to access the CA and submit the certificate request. If IIS is running, then the CA URL is http://servername/certsrv.
      4. Accept the certificate request. For example:
        certreq -accept certnew.cer
      5. Make sure that the server certificate is present on the Active Directory server.
        In the File menu, click Add/Remove, then click Certificates and Personal>Certificates.
      6. Import the CA certificate from Directory Server into Active Directory. Click Trusted Root CA, then Import, and browse for the Directory Server CA certificate.
    5. Reboot the domain controller.

7.4.2. Setting up Password Synchronization

Install the Password Sync Service on every domain controller in the Active Directory domain in order to synchronize Windows passwords.
  1. Download the PassSync.msi file from the Red Hat Enterprise Linux channels, and save it to the Active Directory machine.

    NOTE

    There are two PassSync packages available, one for 32-bit Windows servers and one for 64-bit. Make sure to select the appropriate packages for your Windows platform.
  2. Double-click the PassSync.msi file to install it.
  3. The Password Sync Setup window appears. Hit Next to begin installing.
  4. Fill in the information to establish the connection to the IPA server.
    • The IPA server connection information, including the hostname and secure port number
    • The username of the system user which Active Directory will use to connect to the IPA machine; this is always uid=passsync,cn=systemaccounts,cn=etc,dc=example,dc=com.
    • The password set in the --passsync option when the sync agreement was created
    • The search base for the people subtree, such as ou=People,dc=example,dc=com
    Hit Next, then Finish to install Password Sync.
  5. Import the IPA server's CA certificate into the Active Directory certificate store.
    1. Download the IPA server's CA certificate from http://ipa.example.com/ipa/config/ca.crt.
    2. Copy the IPA CA certificate to the Active Directory server.
    3. Install the IPA CA certificate in the Password Sync database. For example:
      cd "C:\Program Files\389 Directory Password Synchronization"
      	
      certutil.exe -d . -A -n "IPA.EXAMPLE.COM IPA CA" -t CT,, -a -i ipaca.crt
  6. Reboot the Windows machine to start Password Sync.

    NOTE

    The Windows machine must be rebooted. Without the rebooting, PasswordHook.dll is not enabled, and password synchronization will not function.
The first attempt to synchronize passwords, which happened when the Password Sync application is installed, will always fail because of the SSL connection between the Directory Server and Active Directory sync peers. The tools to create the certificate and key databases is installed with the .msi.