Sorry I just happened upon your post facing a similar problem.
My /etc/group file had been emptied. The only file with *most* of the correct group info was /etc/group- (the "-" on purpose).
I did the following:
]# cp /etc/group- /etc/group
Then I manually ran ISPConfig 2's writeconf.php script, using ISPConfig 2's own php:
]# /root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php
If the writeconf.php script produces an error even after copying the group- file to group, you might have to rebuild some elements manually.
I had this problem happen before and started running a backup script for /etc/group, /etc/shadow, etc files to avoid disruption. It can be run via Cron daily, hourly, or whenever
This script force copies the respective files to a [filename]-bak-[current date] copy. If you run it daily, your /etc folder will fill up with many days worth of backup copies. If disk space is low, you should probably add some code that erases backup copies older than x days....
# Backup Passwd and Shadow Files
cp -f /etc/passwd /etc/passwd-bak-$(date +%Y%m%d%H%M%S);
cp -f /etc/shadow /etc/shadow-bak-$(date +%Y%m%d%H%M%S);
cp -f /etc/group /etc/group-bak-$(date +%Y%m%d%H%M%S);
cp -f /etc/gshadow /etc/gshadow-bak-$(date +%Y%m%d%H%M%S);