How To Search for Users Not Having An Attribute Set
Your need to identify users which do NOT have an attribute set.
I.e. you need a list of all users being students (attribute ucsschoolRole) where the attribute ucsschoolRecordUID is not set.
Solution
Use a LDAP filter in univention-ldapsearch
as follows:
univention-ldapsearch -LLL '(&(!(ucsschoolRecordUID=*))(ucsschoolRole=student*))' dn