View Single Post
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
Sure.. it's good practice to shebang the scripts though.

That is...

Code:
#!/bin/bash
fsck -fy
mount -uw /
rm /var/db/.applesetupdone
cd /users
rm -rf user
reboot   #does this need to be done with elevated permissions?  If so, toss in sudo
It would be easy, at this point to establish what user by simply doing something like...

Code:
#!/bin/bash
if [ $# -ne 1 ] ; then 
	echo "Usage: $0 username"
	exit
fi

fsck -fy
mount -uw /
rm /var/db/.applesetupdone
rm -rf /users/$1
reboot   #does this need to be done with elevated permissions?  If so, toss in sudo

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks