Forge Home

realmd

Puppet module to install and configure Realmd

74,104 downloads

19,078 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.4.0 (latest)
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.0.0
  • 0.1.3
  • 0.1.2
  • 0.1.0
released Sep 16th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.0.0 < 6.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'walkamongus-realmd', '2.4.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add walkamongus-realmd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install walkamongus-realmd --version 2.4.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

walkamongus/realmd — version 2.4.0 Sep 16th 2018

Build Status

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with realmd
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.

Overview

This module installs and configures Realmd and joins a domain. It will also optionally control the Kerberos client and SSSD configuration files and the SSSD service.

Module Description

Realmd is a high-level tool for discovering and joining domains. It provides automatic base configuration of SSSD, nsswitch settings, and PAM configuration changes necessary for a Linux client to participate in an Active Directory domain.

This module will install the necessary Realmd packages and dependencies, configure Realmd, and join an Active Directory domain via one of two methods:

  • Username and password
  • Kerberos keytab file

It also optionally manages the contents of the Kerberos client configuration and SSSD configuration files.

Setup

What realmd affects

  • Packages
    • Redhat Family
      • realmd
      • adcli
      • sssd
      • krb5-workstation
      • oddjob
      • oddjob-mkhomedir
    • Debian Family
      • adcli
      • krb5-user
      • sssd
      • sssd-tools
      • samba-common-bin
      • samba
      • libpam-modules
      • libpam-sss
      • libnss-sss
  • Files
    • /etc/realmd.conf
    • /etc/sssd/sssd.conf
    • /etc/krb5.conf
    • /usr/share/pam-configs/realmd_mkhomedir (Debian Family)
  • Services
    • sssd
  • Execs
    • for username and password joins
      • the realm join command is run with supplied credentials
    • for keytab joins
      • the kerberos config file (/etc/krb5.conf) will be placed on disk
      • the kinit command is run to obtain an initial TGT
      • the realm join command is run to join via keytab
    • For Debian Family
      • triggers a pam-auth-update to activate the mkhomedir
    • the SSSD config cache is forcibly removed on each config change to ensure cache is rebuilt

Setup Requirements

  • Keytabs
    • this module does not manage keytabs -- the krb_keytab parameter is an absolute path to a keytab deployed in some way outside of this module

Beginning with realmd

Setup realmd and join an Active Directory domain via username and password:

class { '::realmd':
  domain               => 'example.com',
  domain_join_user     => 'user',
  domain_join_password => 'password',
}

Joining with a prepared computer account

  1. Create the computer account by running adcli on any domain joined machine
  • new computer account: /usr/sbin/adcli preset-computer --domain example.com
  • or use an existing account: /usr/sbin/adcli reset-computer --domain example.com
  1. Configure the realmd class
    class { '::realmd':
      domain             => $::domain,
      one_time_password  => 's3cure_pw', #optional, skip if you didn't specify it when running preset-computer# 
      #do not set domain_join_user
      #do not set krb_ticket_join
    }

Errors when running wio

  1. Error: adcli join ... returned 3 instead of one of [0]

The account hasn't been prepared properly or the password is wrong

Usage

Set up Realmd, join an Active Directory domain via a keytab and fully configure SSSD:

class { '::realmd':
  domain             => $::domain,
  domain_join_user   => 'user',
  krb_ticket_join    => true,
  krb_keytab         => '/tmp/keytab',
  manage_sssd_config => true,
  sssd_config        => {
    'sssd' => {
      'domains'             => $::domain,
      'config_file_version' => '2',
      'services'            => 'nss,pam',
    },
    "domain/${::domain}" => {
      'ad_domain'                      => $::domain,
      'krb5_realm'                     => upcase($::domain),
      'realmd_tags'                    => 'manages-system joined-with-adcli',
      'cache_credentials'              => 'True',
      'id_provider'                    => 'ad',
      'access_provider'                => 'ad',
      'krb5_store_password_if_offline' => 'True',
      'default_shell'                  => '/bin/bash',
      'ldap_id_mapping'                => 'True',
      'fallback_homedir'               => '/home/%u',
    },
  },
}

Reference

Parameters

Default values are in params.pp.

  • realmd_package_name: String. The name of the main Realmd package.
  • realmd_config_file: String. The absolute path of the Realmd configuration file.
  • realmd_config: Hash. A hash of configuration options structured in an ini-style format.
  • homedir_umask: String. A string of the umask for the default directory permissions created by mkhomedir with Debian.
  • adcli_package_name: String. The name of the adcli package
  • krb_client_package_name: String. The name of the Kerberos client package.
  • sssd_package_name: String. The name of the main SSSD package.
  • sssd_service_name: String. The name of the SSSD service.
  • sssd_config_file: String. The absolute path of the SSSD configuration file.
  • sssd_config: Hash. A hash of configuration options structured in an ini-style format.
  • manage_sssd_config: Boolean. Enable or disable management of the SSSD configuration file.
  • required_packages: Hash. A hash of package resources to manage for any auxilliary functionality.
  • domain: String. The name of the domain to join.
  • domain_join_user: String. The account to be used in joining the domain.
  • domain_join_password: String. The password of the account to be used in joining the domain.
  • one_time_password: The password of the prepared computeraccount.
  • krb_ticket_join: Boolean. Enable of disable joining the domain via a Kerberos keytab.
  • krb_keytab: String. The absolute path to the Kerberos keytab file to be used in joining the domain.
  • krb_config_file: String. The absolute path to the Kerberos client configuration file.
  • krb_config: Hash. A hash of configuration options structured in an ini-style format.
  • manage_krb_config: Boolean. Enable or disable management of the Kerberos client configuration file.

Classes

  • realmd::params
  • realmd::istall
  • realmd::config
  • realmd::join
  • realmd::join::password
  • realmd::join::keytab
  • realmd::join::one_time_password
  • realmd::sssd::config
  • realmd::sssd::service

Limitations

This module requires Puppet >= 3.4.0 or Puppet Enterprise >= 3.2 due to it's use of the contain function. It has only been tested on RHEL/CentOS 7 and Debian Jessie 8