Creating an image of OSX with no users

Discussion in 'macOS' started by jmitch720, Feb 8, 2012.

  1. jmitch720 macrumors member

    Mar 2, 2009
    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,
  2. simsaladimbamba

    Nov 28, 2010
  3. jmitch720 thread starter macrumors member

    Mar 2, 2009
  4. Intell macrumors P6


    Jan 24, 2010
    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.
  5. Mal macrumors 603


    Jan 6, 2002
    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:
    rm -R /Users/[username]
    launchctl load /System/Library/LaunchDaemons/ &
    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.

  6. ccnp11 macrumors newbie

    Nov 26, 2011
    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. :)
  7. jmitch720 thread starter macrumors member

    Mar 2, 2009
    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.

Share This Page