prosody: add LDAP authentication via SASL mechanism

This commit is contained in:
netaskd
2019-03-13 20:10:40 +03:00
committed by Saúl Ibarra Corretgé
parent 0db4b7dce9
commit 2e3576f6ca
9 changed files with 151 additions and 16 deletions

View File

@@ -1,5 +1,16 @@
#!/usr/bin/with-contenv bash
if [[ ! -f /config/saslauthd.conf ]]; then
cp /defaults/saslauthd.conf /config/
fi
if [[ ! -f /etc/saslauthd.conf ]]; then
tpl /config/saslauthd.conf > /etc/saslauthd.conf
mkdir -pm777 /var/run/saslauthd
adduser prosody sasl
echo >> /etc/ldap/ldap.conf "TLS_REQCERT allow"
fi
PROSODY_CFG="/config/prosody.cfg.lua"
if [[ ! -d /config/data ]]; then

View File

@@ -0,0 +1,2 @@
pwcheck_method: saslauthd
mech_list: PLAIN

View File

@@ -0,0 +1,2 @@
#!/usr/bin/with-contenv bash
exec s6-setuidgid root saslauthd -a ldap -O /etc/saslauthd.conf -c -m /var/run/saslauthd -n 5 -d