Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fxscreamer

macrumors member
Original poster
Oct 12, 2008
53
5
Ok, so I've been searching everywhere for the actual code, but I know this can be done, because I've SEEN it done. I just can't remember how. I know it's only about 4-5 lines of code in Applescript.

What I know

"username" and "password" to verify
remove groups
remove user
remove applesetupdone
remove script

I can't remember the proper commands, but I believe they're in that order. Let's say I just installed Snow Leopard fresh, installed iLife 11, then ran all updates up to 10.6.6. I made an account with a user named "Service" and a password as "apple". This script could sit on the desktop when I was done, double click it, it runs, removes all the user stuff, then the script itself. Now all I do is restart, and perfecto......WELCOME TO OSX SETUP SCREEN (with latest software and updates installed)

does anyone know the exact code to carry out these commands? I keep running into errors in applescript. It would be greatly appreciated. :rolleyes:
 
Got the code

#!/bin/sh

# removeuser.sh

echo "apple" | sudo -S rm -R /Users/service
sudo rm /private/var/db/.AppleSetupDone
sudo dscl . -delete /Groups/service
sudo dscl . -delete /Users/service


So just make sure your user is "service" and password is "apple". This was made as an application in applescript. Or you can just change those user values. Whatever you want.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.