add debconf template and fix sed
Deploy Package / Explore-Gitea-Actions (push) Successful in 11s Details

This commit is contained in:
Carneiro 2024-11-17 19:49:50 -03:00
parent 16f09815d8
commit 0a03be9c66
2 changed files with 15 additions and 5 deletions

View File

@ -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

6
templates Normal file
View File

@ -0,0 +1,6 @@
Template: alice-auth/ldap-bind-password
Type: password
Default:
Description: Digite a senha do LDAP.
Senha do user Alice.