title shldap.sh
section 7
project bgscripts-core
volume Shell Programmer's Manual
date April 2020
=====
NAME
  shldap.sh - shell library for ldap functions
DESCRIPTION
  Shldap provides a few functions useful for interacting with ldap directories. Depends on `framework.sh(7)`.
GET HOST KEYTAB
call: get_host_keytab ${SHLDAP_KINIT_HOST_SCRIPT}" "${SHLDAP_KINIT_HOST_SCRIPT_OPTS}" "${SHLDAP_KLIST_BIN}" "${SHLDAP_KRB5CC_TMPFILE}"

Returns nothing. Get the host kerberos ticket-granting ticket.
GET ATTRIB FROM LDAP
call: get_attrib_from_ldap "${LAPS_LDAPSEARCH_BIN}" "${LAPS_LDAPSEARCH_FLAGS}" "${LAPS_LDAPSEARCH_FILTER}" "${LAPS_ATTRIB_TIME}" "${LAPS_LDAPCONF}" "${LAPS_KRB5CC_TMPFILE}" "{LAPS_LDAPSEARCH_STATUS_TMPFILE}"

Returns to standard output the value of the attribute.
UPDATE LDAP
call: update_ldap "${LAPS_LDAPSEARCH_BIN}" "${LAPS_LDAPSEARCH_FLAGS}" "${LAPS_LDAPSEARCH_FILTER}" "${LAPS_LDAPSEARCH_UNIQUE_ID}" "${LAPS_LDAPCONF}" "${LAPS_KRB5CC_TMPFILE}" "|" "${LAPS_ATTRIB_PW}" "${LAPS_phrase}" "${LAPS_LDIF_TMPFILE}" "${LAPS_LDAPMODIFY_BIN}" "${LAPS_LDAPMODIFY_FLAGS}" "${LAPS_TEST}" "${LAPS_TMPFILE1}"

Accepts separated attributes and values to update. The separator can be defined, as seen by the pipe `|` symbol seen in the example.
GET USER KERBEROS TICKET
call: get_user_kerberos_ticket "${LAPS_KERBEROS_USER}" "${LAPS_USER_IS_ROOT}" "${LAPS_KRB5CC_TMPFILE}" "${LAPS_INTERACTIVE}" "${LAPS_KINIT_BIN}" "${LAPS_KLIST_BIN}"

Returns nothing. Get a user ticket-granting ticket.
AUTHOR
  <bgstack15@gmail.com>
COPYRIGHT
  CC-BY-SA 4.0
SEE ALSO
`framework.sh(7)`
