We're having an issue with a new computer suite with Firefox. We are running Mac OS 10.5.4 and FFox 3. When a user logs in and launches FFox, they are told that a session is already running and FFox quits. We have found that if you delete the user's FFox Profile folder (inside ~/Library/Application Support/) FFox will open and work perfectly.
I have thought that we can use a LoginHook to delete the user's FFox profile on log in. However, the user does not have permission to run the script as themselves, but, if I run the script as root (which is what LoginHooks run as), the "current user" variable $1 becomes root, so the script tries to delete root's profile folder!!
Does anyone know how to run a script as root, but return the current logged in user as a variable? Also, does anyone know what the unix variable is to find the group of the current logged in user?