IPA: How to automatically enroll IPA client to IPA Master

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • IPA 3.x
  • IPA 4.x

Issue

  • IPA: How to automatically enroll IPA client to IPA Master

Resolution

A) Method 1

1) IPA Master

1. Login into IPA Master as root.

2. Generate Kerberos ticket for admin user

# kinit admin

3. Add IPA client host with password .

#  ipa host-add <IPA client hostname> --password=<password>

Example:

#  ipa host-add ipaclient.example.com --password=password123

2) IPA Client

1. Login into IPA client as root.

2. Check if the hostname of the client is correct. "Example: ipaclient.example.com".

# hostname

3. Enroll the client to IPA master.

# ipa-client-install --domain=<Ipa domainname> --server=<Ipa server hostname>  --realm=<Ipa realm>  -w <Ipa client password> -U

Example: 

# ipa-client-install --domain=example.com --server=ipaserver.example.com --realm=EXAMPLE.COM  -w password123 -U

Note: The above command will automatically enroll to IPA master server without prompting for any information.

B) Method 2

To directly enroll from IPA client. Follow the steps given below.

1) IPA Client

1. Login into IPA client as root.

2. Check if the hostname of the client is correct. "Example: ipaclient.example.com".

3. Hostname of the ipa clients should be as per IDM domain only.

For more information - Hostname Prechecks

# hostname

3. Execute the below command to enroll to IPA server.

# ipa-client-install --domain=<Ipa domainname> --server=<Ipa server hostname>  --realm=<Ipa realm> -p <Admin username> -w <Admin user password> -U

Example:  

# ipa-client-install --domain=example.com --server=ipaserver.example.com --realm=EXAMPLE.COM   -p admin@EXAMPLE.COM -w admin123 -U

Note: In the above command "admin" user is being used to enroll the client to IPA Server. If normal IPA user need to be used then Host Enrollment privileges has to be assigned to the user. Refer link How to provide privileges to ipa-user to enroll a host in ipa-server?

Reference: Setting up a Linux Client Through Kickstart

  • Component
  • ipa

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments