diff --git a/DEBIAN/postinst b/DEBIAN/postinst index 44a85dc..992bea7 100755 --- a/DEBIAN/postinst +++ b/DEBIAN/postinst @@ -1,6 +1,10 @@ -#!/bin/sh +#!/bin/bash +set -e -# Script executado pós instalação -# systemctl restart nscd -PASS=$(whiptail --passwordbox "Senha do LDAP" 10 50) -sed -i 's/BINDPW/$PASS/' /etc/sssd/sssd.conf +. /usr/share/debconf/confmodule + +db_get alice-auth/ldap-bind-password +LDAP_BIND_PASSWORD="$RET" +CONFIG=/etc/sssd/sssd.conf + +sed -i "s/ldap_default_authtok =.*/ldap_default_authtok = $LDAP_BIND_PASSWORD/" $CONFIG diff --git a/templates b/templates new file mode 100644 index 0000000..631d606 --- /dev/null +++ b/templates @@ -0,0 +1,6 @@ +Template: alice-auth/ldap-bind-password +Type: password +Default: +Description: Digite a senha do LDAP. + Senha do user Alice. +