10 Replies Latest reply: Nov 27, 2011 8:54 PM by Pondini
NypsyZ Level 1 Level 1 (0 points)

Went I installed Lion today on my macbook pro, i missed the setup assistant is there a way to get it back?


MacBook Pro, Mac OS X (10.7.2)
  • Kappy Level 10 Level 10 (244,625 points)

    Only if you erase the drive and reinstall Lion. However, you can use the Migration Assistant instead - in the Utilities folder. It does pretty much the same thing as far as transferring files is concerned.

  • Pondini Level 8 Level 8 (38,720 points)

    See the green box in Using Setup Assistant on Lion.  The last paragraph may be what you want.

  • Linc Davis Level 10 Level 10 (146,980 points)

    Back up all data if you haven’t already done so. Before proceeding, you must be sure you can restore your system to the state it’s in now. If you skip this step, no one but you will be responsible for the consequences.

     

    This procedure is for advanced users only. If you don't understand it, don't do it.


    Launch the Terminal application; e.g., by entering the first few letters of its name in a Spotlight search.   Copy or drag -- do not type -- the line below into the Terminal window, then press return:

     

    sudo rm /var/db/.AppleSetupDone

     

    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. Confirm.

     

    Reboot. The Setup Assistant will launch.

  • Pondini Level 8 Level 8 (38,720 points)

    Does that delete all user accounts, home folders, etc., already on the drive?

  • Linc Davis Level 10 Level 10 (146,980 points)

    No.

  • Pondini Level 8 Level 8 (38,720 points)

    Then wouldn't there be conflicts with re-transferring home folders, user names and UIDs?

     

    And/or "leftover" home folders, taking up extra space (and perhaps not leaving room to re-transfer)?

     

    Or would Setup Assistant overwrite them?

     

    If not, that's why I always refer folks to the green box in Using Setup Assistant on Lion.

  • Linc Davis Level 10 Level 10 (146,980 points)

    I should have said that it doesn't delete user directories. It does re-initialize the 501 account. If you import user data, the entire dslocal database is replaced. Otherwise, other accounts are not affected (at least that's how it was the last time I tried it, which was before Lion; I haven't seen any documentation of a change.) If you ended up with a different set of users than before, you'd have to delete or move the orphaned home folders manually.

  • Pondini Level 8 Level 8 (38,720 points)

    Linc Davis wrote:

     

    I should have said that it doesn't delete user directories. It does re-initialize the 501 account.

    Sorry, I don't understant exactly what you mean.

     

    If you skip Setup Assistant on first boot and create a user (automatically an Admin account with UID 501), then run the command you posted and reboot, what happens when you tell Setup Assistant to transfer users?

     

    Do you mean the 501 user account is replaced by the one transferred by Setup Assistant, even if it has the same user name as the one already created?

     

    What if (as often happens) you had run Migration Assistant and transferred the same or other accounts?   

     

    It sounds like there could easily be various conflicts with user names and/or UIDs -- true?

  • Linc Davis Level 10 Level 10 (146,980 points)

    If you skip Setup Assistant on first boot and create a user (automatically an Admin account with UID 501), then run the command you posted and reboot, what happens when you tell Setup Assistant to transfer users?

     

    If you created a 501 user named "foo" on the first boot, and on the second boot you import a 501 user also named "foo," then you get the imported user's settings and data. If you import a 501 user named "bar," then your 501 user now has that user's name, settings, and data in /User/bar. You also have an orphaned directory /Users/foo. The "foo" user, and all other users defined from the first boot, are gone, but their home folders remain. That's how it worked a few years ago. I haven't tried it since then.

     

    If any conflict would otherwise result, it could be avoided by deleting the dslocal and shadow databases, and the unwanted home folders, along with the "AppleSetupDone" semaphore file before rebooting. You would then be starting with a clean slate.

     

    cd /var/db

    sudo rm -r .AppleSetupDone dslocal shadow /Users/!(Shared)

  • Pondini Level 8 Level 8 (38,720 points)

    Linc Davis wrote:

    . . .

    If you created a 501 user named "foo" on the first boot, and on the second boot you import a 501 user also named "foo," then you get the imported user's settings and data.

    So the user home folder (from first boot) would be replaced by the imported one?   

     

    That seems the opposite of your earlier post: "I should have said that it doesn't delete user directories. It does re-initialize the 501 account."

     

    Seems to me that it would be much simpler and more reliable, especially for a casual user, to create a new, temporary Admin account, delete all the old ones, then use Migration Assistant per the green box in Using Setup Assistant on Lion.  That would preserve all the transferred account names and UIDs.

     

    And even more so, since we're not sure how the other approach would work on Lion.