I have been using the zmprov for connecting mail account to shared mailboxes (child account). It was a little procedure to get it all to work, and I decided to made a script for that so it should be more administrator friendly.
The script works great, it can add, remove and check child account which parent that the child are connected to.

Now here is my question, if you want to check the parent account to see which child account it is connected to, is it possible to do that?
I will include my script so you can see if I have made something wrong with it or maybe forgot something.

#!/bin/sh
WHO=`whoami`
if [ $WHO != "zimbra" ]
then
echo
echo "Execute this script as user zimbra (\"su - zimbra\")"
echo
exit 1
fi
echo "Username of the Mail Account"
read parent
echo "Username of the Shared MailBox Account"
read child
childid=`zmprov ga $child@domain.se | grep zimbraId: | awk '{print$2}'`
echo "ID for $child@domain.se is: "
echo $childid

echo "What to do? 1=Add mailbox 2=Remove mailbox 3=Check users on mailbox"
read test
if [ $test -eq 1 ]
then

`zmprov ma $parent@domain.se +zimbraChildAccount $childid`
`zmprov ma $parent@domain.se +zimbraPrefChildVisibleAccount $childid`
list=`zmprov sa zimbraChildAccount=$childid`
printf "\n$list"
echo ""

elif [ $test -eq 2 ]
then
`zmprov ma $parent@domain.se -zimbraChildAccount $childid`
`zmprov ma $parent@domain.se -zimbraPrefChildVisibleAccount $childid`
list=`zmprov sa zimbraChildAccount=$childid`
printf "\n$list"
echo ""

elif [ $test -eq 3 ]
then
list=`zmprov sa zimbraChildAccount=$childid`
echo
printf "\n$list"
echo ""
fi

Thanks in advanced