I've removed the $switchRealUID condition -- yes one will always want to switch the RealUID. However I'm still having problems testing this script. Changing real and effective UID is no problem. The problem is that I can CHANGE it BACK. Shouldn't that be against the rules, or am I missing something?
john