Sort users to avoid differences between each runs
This commit is contained in:
parent
2cc9078ad9
commit
6b130315dd
|
@ -254,7 +254,9 @@ get_ldap_user_list() { # {{{
|
||||||
Create or empty ${RED}${ldap_user_list_path}${COLOR_DEBUG} file to store user list of ${RED}${ldap_group_cn}${COLOR_DEBUG} LDAP group."
|
Create or empty ${RED}${ldap_user_list_path}${COLOR_DEBUG} file to store user list of ${RED}${ldap_group_cn}${COLOR_DEBUG} LDAP group."
|
||||||
true > "${ldap_user_list_path}"
|
true > "${ldap_user_list_path}"
|
||||||
|
|
||||||
if command ldapsearch -ZZ -D "${ldap_user}" -w "${ldap_passwd}" -H "${ldap_server}" -s one -b "${ldap_group_base}" "(cn=${ldap_group_cn})" member | sed -n 's/\(^member: uid=\)\(.*\)\(,ou=.*\)/\2/p' > "${ldap_user_list_path}"; then
|
if command ldapsearch -ZZ -D "${ldap_user}" -w "${ldap_passwd}" -H "${ldap_server}" -s one -b "${ldap_group_base}" "(cn=${ldap_group_cn})" member \
|
||||||
|
| sed -n 's/\(^member: uid=\)\(.*\)\(,ou=.*\)/\2/p' \
|
||||||
|
| sort > "${ldap_user_list_path}"; then
|
||||||
if [ -s "${ldap_user_list_path}" ]; then
|
if [ -s "${ldap_user_list_path}" ]; then
|
||||||
debug_message "get_ldap_user_list − \
|
debug_message "get_ldap_user_list − \
|
||||||
${RED}${ldap_group_cn}${COLOR_DEBUG} users list successfully created (see ${ldap_user_list_path} file)."
|
${RED}${ldap_group_cn}${COLOR_DEBUG} users list successfully created (see ${ldap_user_list_path} file)."
|
||||||
|
|
Loading…
Reference in New Issue