Hello all,
today I recognized that in one installation all users have no additional groups anymore after the last view updates.
Was there any schema update?
As I checked the groups I could find still all member users.
As a workaround I removed the users and added them again to each group with the following quick&dirty script.
After execution every user had the additional groups back.
#!/bin/bash
LOGFILE=/tmp/groupmembership.list
for u in $(udm users/user list | sed -ne 's|^DN: ||p' | grep -v "Administrator\|Guest")
{
DN=$u
USERNAME="$(echo $DN | cut -d= -f2 | cut -d, -f1)"
echo "Username: $USERNAME" | tee -a $LOGFILE
echo "DN=$DN" | tee -a $LOGFILE
#echo "memberOf:"
for g in $(udm groups/group list --filter memberUid=$USERNAME | grep ^DN: | sed -e "s/DN: /DN:/"| cut -d: -f2 | sed -e "s/ /XXX/")
{
GROUPDN="$(echo $g | sed -e "s/XXX/ /")"
printf "\t$GROUPDN\n" | tee -a $LOGFILE
udm groups/group modify --dn "$GROUPDN" --remove users="$DN"
sleep .5
udm groups/group modify --dn "$GROUPDN" --append users="$DN"
}
echo "---------------------------"
}