ajout liste à partir LDAP

This commit is contained in:
pdiogoantunes 2017-04-05 15:58:31 +02:00
parent 8889ba98b4
commit 4b8cd9a697

View file

@ -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