Ldapsearch command for listing all students of a school just with class membership

Hi,

i need a ldapsearch command for listing all students of a school just with the parameter Username; Email; FirstName;LastName;ClassMembership (no other groups).

Any idea?

Artan

Hi tani,
perhaps the report functionality is what you are looking for?

If you want a command line search; I would use
univention-ldapsearch -LLL '(&(objectClass=organizationalUnit)(ucsschoolRole=*))' 1.1 |grep dn:|cut -d ' ' -f2-|while read dn; do univention-ldapsearch -LLL -b cn=users,$dn objectclass=ucsschoolStudent uidmailPrimaryAddress givenname sn memberof; done

But you get all grouops with that. Play a little bit, perhaps it helps. If would need that; I would extend with sed to drop the other memberOf line (without cn=klassen)

Mastodon