From 3abcb7b1441358c76aba1b9275b293c05e195bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Tue, 22 Sep 2015 17:55:07 +0200 Subject: [PATCH] Script listant l'ensemble des membres actifs. --- surveillance/list_things/list_ma.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 surveillance/list_things/list_ma.py diff --git a/surveillance/list_things/list_ma.py b/surveillance/list_things/list_ma.py new file mode 100755 index 00000000..7063da57 --- /dev/null +++ b/surveillance/list_things/list_ma.py @@ -0,0 +1,11 @@ +#!/bin/bash /usr/scripts/python.sh +# -*- coding: utf-8 -*- + +import lc_ldap.shortcuts as shortcuts +import lc_ldap.attributs as attributs + +if __name__ == "__main__": + LDAP = shortcuts.lc_ldap_readonly() + + LISTE = LDAP.search(u"(&(droits=*)(!(droits=%s)))" % (attributs.multimachines,)) + print " ".join([unicode(user['uid'][0]) for user in LISTE])