Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Create an updated OS X install on a to-be-sold Mac Install
When reselling or gifting a pre-owned Mac, it's convenient to ship it without any accounts, but with all updates and legally-included packages. This is actually quite simple to do. This process uses a number of well-known techniques, which are listed in the order that they are executed. Boot the Mac's original or retail Leopard Install DVD (Hold the 'C' key during startup). When selecting the drive during the OS X install, click the Options button and set it to 'Erase and Install' for a clean install.

Once the initial install is complete, reboot again to the Install Disk. After selecting the default language, immediately choose Reset Password from the Utilities menu. Set the password for the System Administrator (root) user and click the Save button. Quit out of Password Reset, and quit again out of the Installer to restart the Mac. Hold Command-S during restart to enter Single User Mode. Enter the following to turn off the Welcome sequence:
$ /sbin/fsck -fy
$ /sbin/mount -uw /
$ touch /private/var/db/.AppleSetupDone
$ exit
The Mac will now boot to the login window. Log in as root with the password previously set above.

Setup the internet connection and run Software Update from the Apple menu. This will take two or three reboots before all updates are installed. If you're including iLife '09 and/or iWork '09, install them after the first update/reboot sequence, but before repeating the Software Update process. Keep repeating Software Update until it reports that there are no further updates.

Now install any other included packages. If asked, select to install for All Users. Run and install any updates for each package. Don't bother configuring the Dock layout, since the user will end up with Apple's default Dock layout anyway. Avoid making any changes to System Preferences from the default settings. This will assure that the new user starts with a pristine system.

After everything desired is installed and updated, launch Terminal (in /Applications/Utilities) and enter the following code to re-enable the default Welcome sequence.
rm /private/var/db/.AppleSetupDone
Quit Terminal and run Directory Utility, also located in the /Applications/Utilities folder. Select Disable Root User from the Edit menu.

Insert the Leopard Install Disk, restart, and boot from the DVD one more time. Choose Reset Password from the Utilities menu again, but this time, select System Administrator (root) user and click the Reset button. Note: There will now be an iPhone (_usbmuxd) user. It should be ignored and left alone.

Quit Reset Password and the Installer to restart. Hold the Mouse button to eject the Leopard Install DVD and verify that the Welcome movie plays. When the initial setup screen appears, enter Command-Q to shutdown the Mac.

The Mac is now ready to ship!
    •    
  • Currently 3.23 / 5
  You rated: 2 / 5 (13 votes cast)
 
[30,920 views]  

10.5: Create an updated OS X install on a to-be-sold Mac | 33 comments | Create New Account
Click here to return to the '10.5: Create an updated OS X install on a to-be-sold Mac' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: dustin5 on Aug 07, '09 09:19:00AM

Viva Las Vegas!
Nice work, very simple and elegant solution.
Too bad I needed this hint yesterday!



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: Nutnode on Sep 08, '09 06:17:59PM

Thanks for this hint, I stumbled across it as I would like to achieve what you describe, only for a Tiger system install.
Is the syntax identical when working with a Tiger system, or would the hint need to be modified?

I have trawled through the site & have not been able to turn up a Tiger variation.

Cheers, Stephen.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: hamarkus on Aug 07, '09 10:10:29AM

I have trouble understanding what this hint wants to achieve.
(1) Yes, before selling a Mac one should wipe the disk and probably make a fresh install (including all updates).
If the hint is just a very verbose version of that single sentence (1), I do not really see the point of it.
If the point is to deliver the Mac in such a state that upon the first restart it brings up the set-up assistant and allows for the Migration Assistant to be used, maybe that should be pointed out clearly in the motivation for this hint. (I am not even sure whether this hint actually achieves this.)



[ Reply to This | # ]
P.S.: Ah, overlooked reference to welcome movie
Authored by: hamarkus on Aug 07, '09 11:47:54AM

In the very last paragraph, it references the Welcome Movie, thus indicating that the purpose of this hint was the Welcome screen (including set-up assistent).



[ Reply to This | # ]
P.P.S.: Does one really has to bypass the set-up assistant?
Authored by: hamarkus on Aug 07, '09 02:58:53PM

What is wrong with simply going through the welcome routine, do the updates and then just reset that 'Welcome-bit'. Going through the set-up assistant really does not take that long.

So, the gist of the hint seems to me:
rm /private/var/db/.AppleSetupDone

Or does this not work after one went through the set-up assistant?



[ Reply to This | # ]
P.P.S.: Does one really has to bypass the set-up assistant?
Authored by: las_vegas on Aug 07, '09 06:03:45PM

This technique, never creates a user (ID 500), leaving the configuration still in a "virgin" state. The receiver of the Mac will experience the same first use as any new Mac purchase, but not have to deal with the hassle of installing the iApps and all the updates.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: code4fun on Aug 07, '09 11:28:44AM

The only other thing I would add is use the "Security Options" in Disk Utility to do a secure erase prior to install.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: Dirk! on Aug 08, '09 11:35:19AM

Overwritung data multiple times is not necessary any more on current hard drives! Even data recovery service now clearly tell you that on current drives the data density is that high, that after a single overwrite everything is lost.
Suggestions to do multiple overwrites date back to floppy disk and MFM hard disk times.



[ Reply to This | # ]
10.5: Correction
Authored by: las_vegas on Aug 07, '09 11:53:03AM
Unfortunately, this hint has been very much abridged, leaving out very important steps...

After logging as root, you then setup the network normally and install all updates (requires multiple restarts.). Then to return the Mac to the initial Welcome sequence mode and disable the root account, you need to launch Terminal (in /Applications/Utilities) and enter:

rm /private/var/db/.AppleSetupDone

Quit Terminal and launch "Directory Utility" (same folder) and select "Disable Root" from the Edit menu.

Once the above is done, the Mac is ready to ship, fully updated.

[ Reply to This | # ]
10.5: Correction
Authored by: las_vegas on Aug 07, '09 11:55:15AM

Hmm... I didn't see that the rest of the hint was actually there... Hehehe... My mistake. :)



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: leamanc on Aug 07, '09 12:59:15PM

Nice idea, nice approach to the problem. But I just get out the original discs and restore it to factory settings. Once Setup Assistant comes up, I force the power off. The buyer can set up their account and do the updates; I fail to see why I should do that for them, and I rather like selling the machine the way it came from the factory. Just my $0.02.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: las_vegas on Aug 07, '09 05:58:20PM

In this case, I was setting up the computer to send it to my sister. Having all the updates pre-installed would simplify her initial setup. By using this technique, I was able to install all of her needed software without creating a user account on the system.

Too often, I've fixed a user's pre-owned Mac with the account name "Mac-User" and password "password". Since that's the way they received it, they had no idea they should have it setup differently.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: las_vegas on Aug 07, '09 06:14:42PM
One should never, ever force power off a computer unless there is no other option. Forcing the power off (pressing the power button for 4 seconds) has a tendency to leave open files and can potentially damage the drive's directory structure. Quitting the Setup utility is all that's needed to shutdown the newly installed Mac OS X.

[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: frgough on Aug 10, '09 07:05:03AM

Not on journaled file systems.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: UberFu on Aug 10, '09 09:57:04AM

Yes. Even on Journaled File Systems. Nothing is 100% and the Journal can become corrupted.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: Anonymous on Aug 13, '09 03:29:53PM
Especially on commodity journalled filesystems like HFS+. They haven't been exercised nearly so thoroughly as XFS, ZFS, ReiserFS, or ext4.

[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: milney on Aug 07, '09 04:59:16PM

By the sounds of it the solution proposed here does not actually create any users on the machine, hence it's like a factory shipped machine. Whereas your solution would have created a default user and you wouldn't be able to remove that user without first creating another Admin user.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: milney on Aug 07, '09 05:00:19PM

Sorry, that comment was meant to be a reply to hamarkus :-)



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: lazybaer on Aug 09, '09 02:30:22AM

Maybe vegas' solution helps when a Mac has to be sold, it does surely not help, when the mac has a problem (e.g. you cannot start the system anymore) and has to see the service point.

So, I prefer the following:

No personal data on the HDD where the OS sits. Just links to a 2nd HDD (e.g. for Mail, address book, and so on)

If this is not appropriate, e.g. for 'working data' on the Desktop: encrypt it with openssl

So anytime, the Mac can go anywhere with a very, very little risk that data gets in the wrong hands.

Lazy



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: rburgos on Aug 09, '09 10:13:19PM

I know this is a bit off-topic. Another "solution" is to use a spare drive with a basic system configuration which you can swap for your working drive anytime the computer needs to go to the shop. Simply take out the drive with the important data and plug in the spare and send to the shop. Your data stays with you all the time.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: dreemkill on Aug 09, '09 09:28:12AM

thanks! worked great, i just got a call from the guy that bought my computer to tell me i have beautiful kids and a lovely wife. and he just bought a trip to the bahamas on my credit card.





but seriously.






not only is this not complete, its a complete security risk. the only thing this "tip" is doing is bringing you back to the intro movie and account setup. it does not:

rm -rf /Users/useraccount (personal data, including keychains to my bank account)
rm -rf /Library/Preferences (set default application preferences, also could contain personal information)
and finally,
rm /var/db/dslocal/nodes/Default/Users/username.plist to remove the user accounts from the users database.

so unless you want to sell you computer and your bank login, credit card info, porn, and family pictures....i'd recommend doing a little more complete research and work into "tips" like this one.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: dreemkill on Aug 09, '09 09:29:57AM

(sorry, i meant that as a warning to people trying that "tip" as a quick way to virginize their computer to sell...)



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: UberFu on Aug 10, '09 10:05:34AM

The original post did actually mention performing a complete Clean Install and wiping the drive in the process.

to Original Post____
But I have to agree that this is a complete waste of time if one has plans to sell the machine.

An easier way to handle setting up a machine for a sister (or other family memebr/ friend) would simply be to ask them what they'd like their USERID to be. Not hard. And since you're going thru so much trouble to tweak the intial setup - one more thing won't kill you. And since it's a family member and you'll probably be the tech support for them if anything goes wrong then knowing their password won't be an issue either.

Then you can simply skip all the non-sensical steps used to "trick" the system into thinking it's a virgin install that happens to have all the latest updates.

Waste of time.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: las_vegas on Aug 09, '09 06:22:39PM

Nothing of any previous accounts still exists after erasing the drive. Of course, bits and pieces may be grokked with a lot of effort scanning the free space. Since I never, ever store critical personal information in an un-encoded format, I've never worried about such things. If you're concerned about data remaining on the Mac from a previous install, Use the feature "Erase Free Space" from Disk Tools before installing OS X in the first step.

Your little step of rm'ing files would have no effect whatsoever in preventing that data from being accessed since it only removes the directory entry and that was done when the drive was erased.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: romahony on Aug 09, '09 06:38:44PM

i like the way your porn is more important than your family pictures :D



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: Anonymous on Aug 13, '09 03:32:28PM
The bombshell is that they are his family pictures...

[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: da2357 on Aug 10, '09 07:13:42AM

Even with journaling enabled, it's still not good policy to force power off a Mac unless it won't shut down normally.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: hamarkus on Aug 10, '09 11:38:13AM

I understand that this hints avoids creating a user. But is there any harm in creating a UID 500 user? In other words, if resetting the welcome bit is sufficient to get the Welcome Assistant (which I do not know), how hard is it for the next owner to delete a user?



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: las_vegas on Aug 10, '09 01:47:41PM

If the computer is received by a seasoned Mac user, creating a new account and deleting the old is no problem. If it goes to a new user, they have no idea how or why to do this.

I've had many clients in the past where the only account on the machine was "Mac User" or such and the password of "password" or none at all. It's the way they got the machine and the didn't know how to change it.

This process eliminates that situation. There's no account at all until the new user creates it.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: Nutnode on Sep 10, '09 03:54:42PM

I decided to push ahead & try this hint for a Tiger install and, for the benefit of any body else thinking of attempting same, I can confirm following the instructions given I successfully managed to create a fully updated Tiger system alongside fully updated (service releases) copies of the iLife apps that would of originally shipped on the Mac.

Booting the iMac G5 ALS now runs the Welcome movie & setup routine as if direct from Apple when new.

THERE WAS ONLY ONE DIFFERENCE IN THE PROCESS - When disabling root access in the GUI, this is done in the Security menu of "NetInfo Manager" app (also located in Utilities) rather than "Directory Utility" as stated in the hint for Leopard.

Thank you Las Vegas for the excellent hint.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: waffffffle on Sep 18, '09 09:19:34AM

You shouldn't need single user mode. You can run the command by launching Terminal while booted off the install disc. You don't need the first two lines, just run the command on the /Volumes/Macintosh HD disk.



[ Reply to This | # ]
10.5: Create an updated OS X install on a to-be-sold Mac
Authored by: las_vegas on Sep 27, '09 03:16:32AM

You haven't tried this have you? Terminal, while booted from the Install DVD operates on the DVD, not the Boot Drive. Executing the same commands from the DVD Terminal, would not work and may not even be available from the DVD's booted OS.



[ Reply to This | # ]