How to Fix the Unknown Group (Permissions)
Leopard sets up accounts and permissions differently than Tiger did. In Leopard, users belong to the staff group, while in Tiger they each belonged to their own one-member group named with their short name. Leopard's installation script doesn't migrate the accounts, it just leaves them intact. For example, in Tiger, my XYZ account belong to the XYZ group. Leopard didn't correct that to the staff group (20) or define the XYZ group, so my files belonged to an unknown group. That causes problems with Spotlight and a lot of other stuff.
SOLUTION
The solution requires a separate admin account and enough disk space to make a copy of the home folder.
Prepare for this by unregistering your computer from dot Mac and logging out of it. Also, turn off the Time Machine.
1. Create folders in /Users/Shared that correspond to the folders in the home folder (Desktop, Documents, Library, and so forth)
2. Move the contents of each folder in the home folder to the corresponding folder in /Users/Shared. (For example, contents of Documents to Documents). You cannot just move the folders, because you won't be able to open them from another account.
3. Log off, then log into the separate admin account. Delete the troublesome account, and select the option to delete the Home folder. This is necessary because the troublesome account is irredeemable, and it's the only way you can reuse the short name.
4. Create a new account with the same name, short name, and password as the now-deleted troublesome account and log into it.
5. Open two Finder windows, Sharing and the current account's home folder. Move the files to the current account, but don't overwrite the top-level folders (Desktop, Documents, and so on), move their contents. If you cannot overwrite a folder, open it, and move the contents.
6. When you are working on the /Users/Shared/Library folder, move the Mail folder to the desktop so you can import the mail boxes into your new setup.
7. If you have more than one Mac and you have dot Mac, register the computer and sync now.
8. Import the mailboxes from the Mail folder on your desktop.
Now your user account is ready to use, almost indistinguishable from the old one, except all the permissions are correct and everything works well. There may be a few preferences here and there that you might have to reset.
9. I recommend using Disk Utility to erase the Time Machine disk so you can start over.
This isn't easy, but it less painful than erase-and-install followed by installing all your applications.
24" iMac and 15" MacBook Pro, Mac OS X (10.4.10)