From: Nicolas Boisselier Date: Mon, 13 Feb 2017 10:02:38 +0000 (+0000) Subject: ldap X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=ae5d495dd26357a1619e903938aab6ba2e2d7cf4;p=nb.git ldap --- diff --git a/etc/profile.d/ldap.sh b/etc/profile.d/ldap.sh index 514c9142..6f312f12 100644 --- a/etc/profile.d/ldap.sh +++ b/etc/profile.d/ldap.sh @@ -3,3 +3,7 @@ which ldapsearch > /dev/null || return ldap_config() { ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config } + +ldap_cn() { + ldapsearch -x '(cn=*)' dn | grep ^dn | sed 's/dn: //' +}