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

jmitch720

macrumors member
Original poster
Mar 2, 2009
44
5
Hello all,
I would like to create an image of OSX (10.6.8) for work, with applications like MS office and stuff already installed. But I would like it to not have any users, so that starting it for the first time it prompts to create a user. How can I begin to accomplish this? Do I make a user to create the image and then erase the user somehow?

Thanks very much,
Jonathan
 
One way you could do this is too have two Macs. Install Mac OS X on Mac 1 and have it restart into Target Disk Mode when it asks you to restart by holding down T after you hear the startup noise. Then connect it to Mac 2 and use CarbonCopyCloner to create an image out of it.
 
You can try via CarbonCopyCloner and after you have cloned to the external HDD/volume, you delete the user folder via Finder.
Then boot from it, and see, what happens.


There will be a couple more steps in order to make this work.

OP, I assume you'd want it to simply come up with the standard Setup Assistant in order to create a new user? If so, you'll need to do a few things to make that happen and not leave behind any entries that could cause problems. My recommendation is to do all of the installs, then boot that system into single user mode (Command-S at startup) and enter the following commands:
Code:
rm -R /Users/[username]
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist &
dscl . delete /Users/[username]
dscl . delete /Groups/admin GroupMembership [username]
rm /var/db/.AppleSetupDone
shutdown -h now

(Note, don't type any of the brackets there, just the actual username.)

That will first remove the user library, then remove the entries in the DirectoryServices database, then tell the Setup Assistant to run the next time the computer is started up. The last line of course tells the computer to shut down.

Then make the image and every time it's used to do a restore, there will be no user accounts on the machine and it will run the Setup Assistant so a new user can be created.

jW
 
I assume what you're trying to do is create an "unattended install" as many organizations do for w1nBl0w$. I can't help you too much as I've not been a systems guy for several years (thank god) but just deleting the users' folder probably won't eliminate their existence in the system. Probably the best option would be to create an image with a single admin user that you can then customize on a per workstation basis after installation.

[EDIT] someone clearly far more knowledgable than myself just answered this far better than I could. Please ignore my post. :)
 
There will be a couple more steps in order to make this work.

OP, I assume you'd want it to simply come up with the standard Setup Assistant in order to create a new user? If so, you'll need to do a few things to make that happen and not leave behind any entries that could cause problems. My recommendation is to do all of the installs, then boot that system into single user mode (Command-S at startup) and enter the following commands:
Code:
rm -R /Users/[username]
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist &
dscl . delete /Users/[username]
dscl . delete /Groups/admin GroupMembership [username]
rm /var/db/.AppleSetupDone
shutdown -h now

(Note, don't type any of the brackets there, just the actual username.)

That will first remove the user library, then remove the entries in the DirectoryServices database, then tell the Setup Assistant to run the next time the computer is started up. The last line of course tells the computer to shut down.

Then make the image and every time it's used to do a restore, there will be no user accounts on the machine and it will run the Setup Assistant so a new user can be created.

jW

Yes. This sounds like what I want to do. I will try it tomorrow and let you guys know how it goes. Thanks very much.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.