This script will remove the current user (the user who runs the script), thier home directory, and the ".AppleSetupDone" file (not necessarily in that order). This is useful for getting comptuers that were setup back to a restored condition (booting to the setup assistant). The script requires that an administrator account be used.
The "remove_user" script has tested successful on Mac O.S. X versions 10.3.5 and later. Earlier versions of Mac O.S. X behave differently with this script's execution. Particularly, on Mac O.S. 10.2.x, the script will not restart the computer automatically after execution, and the user must choose "Restart" from the "Apple" menu after the script reports failure on restarting. This happens after removing the current user's account record and trying to execute the final restart command. So far, later versions of 10.3 behave correctly.
Regardless, there are no warranties implied or otherwise as to this software's use, misuse, abuse, or and damage resulting from, or due to the use of this software. The developers hold no responsibility for any loss of data. The user (you) of this script should be well aware that they are using this software AT THIER (YOUR) OWN RISK.