pasterblaster.blogg.se

Wipe a mac clean os x 10.4
Wipe a mac clean os x 10.4








And note that if you change the name of the script you'll need to change the script line that deletes itself - use wallybear's suggestion to make it painless. delete /users/usernameelif ] then#if we're in 10.4 remove the user account this way# remove netinfo databaserm -rf /var/db/netinfo/local.nidbelif ] then#if we're in 10.3 remove the user account this way# remove netinfo databaserm -rf /var/db/netinfo/local.nidbelseecho "unrecognized system"exitfi#further commands will run in 10.3, 10.4, or 10.5# delete user folderrm -rf /Users/username# remove setup done file so setup runs on bootrm /var/db/.AppleSetupDone# remove network configuration filesrm /Library/Preferences/SystemConfiguration/*# remove this scriptrm /userreset.sh# shutdown the computershutdown -h nowĬopy and paste it into text edit, make sure it's plain text not RTF, then save it as "userreset.sh" or whatever you'd like just make sure the ".sh" is on the end. delete /groups/staff GroupMembership usernamedscl. delete /groups/.1 GroupMembership usernamedscl. delete /groups/admin GroupMembership usernamedscl. delete /groups/_lpadmin GroupMembership usernamedscl. delete /groups/_appserverusr GroupMembership usernamedscl. delete /groups/_appserveradm GroupMembership usernamedscl. = # /bin/sh# check and mount the hard drive/sbin/fsck -fy/sbin/mount -uw /#determine which OS we're on - clunky but it works.x_5=`sw_vers -productVersion | grep "10.5"`x_4=`sw_vers -productVersion | grep "10.4"`x_3=`sw_vers -productVersion | grep "10.3"`#if we're 10.5, remove user account this wayif ] then# start directory serviceslaunchctl load /System/Library/LaunchDaemons/# remove user from directory servicesdscl. PS - I'm sure I looked at the same sources as the OP when I wrote this - I don't want to take credit for the methodology. Really wish this functionality could get rolled into AppleJack. My scripting is pretty rusty but it gets the job done I'd love to see someone clean it up a bit. Also the script removes itself, and the name and location are hardcoded, so adjust those as well. Please note that I hard coded the user account someone could easily modify it to find it automatically or as a command line argument. Drop it in the root level of the hard drive, then boot to single user mode and run it. Here's a little script I wrote that will clear user info on recent versions of OS X. Please know what you're doing before trying this - the dscl command will let you wreak havoc on your system if you're not careful! Much of this was taken from this entry in Robert Daeley's blog at O'Reilly. All done? Type reboot to reboot the system or shutdown -h now to shut down the system.AppleSetupDone file in /var/db to cause the Setup Assistant to run when next booted.

Wipe a mac clean os x 10.4 archive#

At this point, you may wish to remove or archive the user folder in /Users.delete /groups/username (this may not be necessary - you may get an error that the group doesn't exist you can ignore it and go on). Remove the group corresponding to the username: dscl.

wipe a mac clean os x 10.4

list /groups GroupMembership | grep username - repeat for each group except for the user's own group.

  • Find what groups the user belongs to: dscl.
  • wipe a mac clean os x 10.4

    Launchctl load /System/Library/LaunchDaemons/ that single user mode said to use, but that didn't work - this did.








    Wipe a mac clean os x 10.4