From 4b8cd9a69715592688b62513fd9ca1522b4c81b7 Mon Sep 17 00:00:00 2001 From: pdiogoantunes Date: Wed, 5 Apr 2017 15:58:31 +0200 Subject: [PATCH] =?UTF-8?q?ajout=20liste=20=C3=A0=20partir=20LDAP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TipsShell.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TipsShell.md b/TipsShell.md index 4edafb40..89e1d214 100644 --- a/TipsShell.md +++ b/TipsShell.md @@ -179,6 +179,11 @@ $ for user in $(getent passwd | awk -F ':' '$3 > 10000 {printf $1 " "}'); do gro #### LDAP +~~~{.bash} +$ foor user in $(getent passwd | awk -F ':' '$3 > 10000 {printf $1 " "}'); do \ +ldapsearch -x -h localhost -LLL -b "uid=$user,ou=people,dc=MACHINE,dc=evolix,dc=net" cn | tail -n2 | \ +tr '\n' ' ' | cut -d':' -f2 | echo -n "$(cat <&0)"; echo = $(groups $user); done +~~~ ## Serveur web