File tree 1 file changed +17
-4
lines changed
1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 74
74
#
75
75
MY_LDAP_HOSTURI=" ldap://localhost:389"
76
76
77
+ #
78
+ # LDAP custom parameters
79
+ # eg: -E pr=500/noprompt
80
+ # eg: -o ldif-wrap=no
81
+ # eg: -Q -Y EXTERNAL
82
+ # eg (default): -x
83
+ #
84
+ # For Authentication use : -E pr=500/noprompt -o ldif-wrap=no -x
85
+ # For socket use : -E pr=500/noprompt -o ldif-wrap=no -Q -Y EXTERNAL
86
+ #
87
+ # LDAP_PARAM="-E pr=500/noprompt -o ldif-wrap=no -x"
88
+
77
89
#
78
90
# LDAP root DN (optional)
79
91
# eg: cn=Manager,dc=example,dc=com
@@ -135,12 +147,11 @@ MY_LDAP_MAIL_ATTR=mail
135
147
#
136
148
export LC_ALL=en_US.UTF-8
137
149
138
-
139
150
#
140
151
# Mail from
141
- # MY_MAIL_FROM=""
142
-
143
152
#
153
+
154
+
144
155
# Mail body message, with particular variables :
145
156
# %name : user name
146
157
# %login : user login
@@ -222,7 +233,9 @@ getTimeInSeconds() {
222
233
tmp_dir=" /tmp/$$ .checkldap.tmp"
223
234
result_file=" ${tmp_dir} /res.tmp.1"
224
235
buffer_file=" ${tmp_dir} /buf.tmp.1"
225
- ldap_param=" -LLL -H ${MY_LDAP_HOSTURI} -x"
236
+ [ -z " ${LDAP_PARAM} " ] && LDAP_PARAM=" -x" # default authorization
237
+ echo " ${LDAP_PARAM} " | grep -E " Q|Y|x" 1> /dev/null || LDAP_PARAM=" ${LDAP_PARAM} -x"
238
+ ldap_param=" ${LDAP_PARAM} -LLL -H ${MY_LDAP_HOSTURI} "
226
239
nb_users=0
227
240
nb_expired_users=0
228
241
nb_warning_users=0
You can’t perform that action at this time.
0 commit comments