Univention Bugzilla – Bug 56581
Users are not removed from old groups when moved to limbo / transfer school
Last modified: 2024-02-08 13:50:14 CET
It looks like users who are moved to the limbo / transfer school are not removed from every school group. The result is that the password reset for the previous classes or working groups don't work.
If someone has a similar problem, I wrote a simple shell script which shows the udm commands: cat remove-transfer-users-from-groups.sh #!/bin/bash eval $(ucr shell) univention-ldapsearch -b "ou=transfer,$ldap_base" '(&(ucsschoolRole=student:school:transfer)(uid=*))' dn | ldapsearch-wrapper | sed -ne 's|^dn: uid|uid|p' | while read u_dn; do univention-ldapsearch "(uniqueMember=$u_dn)" dn | ldapsearch-wrapper | sed -ne 's|^dn: cn|cn|p' | while read g_dn; do transfer="$(echo $g_dn | grep ',ou=transfer,')"; if [ -n "$transfer" ]; then continue; fi; echo udm users/user modify --dn \"$u_dn\" --remove groups=\"$g_dn\"; # udm users/user modify --dn "$u_dn" --remove groups="$g_dn"; done; done