#!/bin/sh if [ "${idm_bootstrap:-}" = true ] || [ "${enable_idm:-}" = false ]; then return 0 fi # Create state dataset to persist keytabs across OS rebuilds. create_dataset -o "mountpoint=${keytab_dir}" "${state_dataset}/keytabs" # Install packages. pkg install -y \ cyrus-sasl-gssapi \ nss-pam-ldapd-sasl \ openldap26-client \ pam_krb5 \ perl5 \ p5-perl-ldap \ p5-Authen-SASL # Configure PAM/NSS integration. install_file -m 0644 \ /etc/nsswitch.conf \ /etc/pam.d/sshd install_template -m 0644 \ /etc/krb5.conf \ /etc/nscd.conf \ /usr/local/etc/openldap/ldap.conf \ /usr/local/etc/nslcd.conf # Create ldap.conf symlink. ln -snfv /usr/local/etc/openldap/ldap.conf /usr/local/etc/ldap.conf # Create host object (if it doesn't exist). ldap_add "cn=${BOXCONF_HOSTNAME},${hosts_basedn}" <