summaryrefslogtreecommitdiffstats
path: root/debian/tests/ldap-user-group-ldap-auth
blob: c25cff01272ac2b86a2787a51ff1bbc246cd11e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

set -ex

. debian/tests/util
. debian/tests/common-tests

mydomain="example.com"
myhostname="ldap.${mydomain}"
mysuffix="dc=example,dc=com"
admin_dn="cn=admin,${mysuffix}"
admin_pw="secret"
ldap_user="testuser1"
ldap_user_pw="testuser1secret"
ldap_group="ldapusers"

adjust_hostname "${myhostname}"
reconfigure_slapd
generate_certs "${myhostname}"
enable_ldap_ssl
populate_ldap_rfc2307
configure_sssd_ldap_rfc2307
enable_pam_mkhomedir

# tests begin here
run_common_tests

echo "The LDAP user can login on a terminal"
/usr/bin/expect -f debian/tests/login.exp "${ldap_user}" "${ldap_user_pw}"