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

Make OS X re-run the initial setup assistant System
Over on Macintouch's Mac OS X Reader Reports (well worth reading, as there's a ton of good info collected there!), Paul Christensen posted some information he received from Apple's tech support group regarding the initial setup assistant (which configures your primary user account, among other things).

According to Apple, to re-run the assistant, you need to:
  1. Boot into single-user mode (command-S during startup)
  2. Once the command-line prompt appears, type the following:
    mount -uw /
    cd /private/var/db/netinfo
    mv local.nidb local.old
    rm ../.AppleSetupDone
    exit
When you hit RETURN after typing exit, OS X will restart and the setup assistant will launch automatically. So if you've somehow messed up your primary OS X user, this is a good fix that may get you up and running again, even if re-running the OS X installer does not.
    •    
  • Currently 3.86 / 5
  You rated: 1 / 5 (7 votes cast)
 
[80,153 views]  

Make OS X re-run the initial setup assistant | 15 comments | Create New Account
Click here to return to the 'Make OS X re-run the initial setup assistant' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make OS X re-run the initial setup assistant
Authored by: cynikal on Dec 22, '03 05:00:13PM

This is an awesome hint.. it still works with panther (the netinfo structure remains similar)..

It's particularly useful a hint because I purchased a powerbook for my girlfriend and i want to pre-load it with some apps/games/music for her, but don't want to take the experience away from her of going through the setup assistant (she was there with me when i ran mine when i first got a powerbook).

Happy holidays! :)



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: Crimson Napkin on Feb 27, '04 12:52:50PM

I tried to submit basically this same hint a little while ago... I thought I discovered it... now I feel a bit foolish... lol.
When I used this hint I did it a bit differently leaving out the

mv local.nidb local.old
. Also, this tip seems to be for Jaguar... in Panther the file to
rm
is located in
/private/var/db
not in
/private/var/db/netinfo

Why did I use this? I needed to use it when a software demo messed up my password (no idea how) and left me locked out of my account... my ONLY account. I did not have my installation disks with me and the only tip I could find about how to get in (I had to use a *gag* windows box to search) did not work in my case (it involves using SystemStartup to get things running but if you are running a web server, the startup will go into a loop when trying to load it). Without this way of getting in, I would have been in bad shape (I need my Mac for work so not getting in was not an option).

FYI... the above hint doesn't mention it but in my case the primary account (mine) was fine after I booted in, created a new account and reset the password on my original account.

---
macosxhints.com is one reason PC users should switch to a Mac.

[ Reply to This | # ]

Make OS X re-run the initial setup assistant
Authored by: sphere on Mar 23, '04 09:44:13AM
Take closer look at the rm command, you will see that the panther rm file is located in the same directroy as the Jag file.

rm ../.AppleSetupDone


[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: johnsawyercjs on Aug 17, '04 03:42:15AM

In both Jaguar and Panther, the file .AppleSetupDone is at

/private/var/db

The original hint might seem to imply that it's at

/private/var/db/netinfo

...since that's where the hint says to cd to, but the first two periods in

rm ../.AppleSetupDone

changes the target of the rm command up one level, into the /private/var/db directory. If you're able to boot into OS X instead of needing to use this to fix a nonbooting X, and you don't feel comfortable using the command line, just use a utility like Cocktail or OnyX to make the files visible, and moved them manually.



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: johnsawyercjs on Aug 17, '04 03:45:56AM

I forgot to mention: the file .AppleSetupDone is zero K, meaning it doesn't contain any data, so don't worry about trashing it--its presence alone is taken by the OS to indicate that the setup process has been completed.



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: Davekro on Jan 02, '05 09:53:55PM

I was able to CCC clone my old PowerBook OS to a volume on my (new to me) G5 internal HD, Archive and Install OS 10.3 into that volume then do combo update to 10.3.7. So Powerbook system is running in one partition of the internal G5 drive.

What I am really trying to get to is combining my old data and software from the PowerBook and the software on the new to me G5 without (as much as possible) disableing/damaging/deleting the software on the G5.

To this end I attempted entering Single User Mode and typing the recommedned:
mount -uw /
cd /private/var/db/netinfo
mv local.nidb local.old
rm ../.AppleSetupDone
exit

But when I got the black screen with white text on my second try...

When I hit 'return' to start a new line to enter the above text, the cursor was at the end of a second line ...Root # again. As I tried just typing all in one line (which did not seem correct), the fan keft getting louder and louder so I decided to get out by holding the power button 5 seconds to force quit.
Did I mess up the copy of that volume -OR- both copies on 2 of the 3 volumes with clones on the internal drive? Should I erase both volumes (or even 'zero' and repartition the entire drive to be safe)?

First attempt was with a 'non Apple Keyboard' which did not get the white text screen. second try I plugged an Apple keyboard in and got the white text (as stated above). Both attempts had the Microsoft ergonomic wireless keyboard and the external HD still connected.

I am hoping where there is a will... there may be a way. ;o)

Best to you,
Dave

Back to top



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: yanokwa on Dec 07, '04 02:26:38AM
I tried restoring my NetInfo backup and I too fell into the WebServer loop.

I followed Crimson Napkin's method and tried to create another admin account but that did not work for some reason.

To workaround it, I re-ran the setup assistant and I created a user with the exact same information (Name, Shortname, Password) as the one I screwed up. It worked perfectly.

[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: jconnolly on Jan 12, '05 05:46:59PM

When a colleague inherited a laptop from another user, a new admin account was created and the old account deleted. After a while, OS applications (like iCal, DiskUtil, etc.) wouldn't run at all. Repairing permissions sometimes fixed the problem for a day.

We used this trick to persuade the OS that the new user was the "rightful owner" of the computer with the following additions:

1) once rebooting into System User mode (command-S), we performed an fsck on the disk. Since it was a Panther system, the command line was:

/sbin/fsck -y -f

Everything was fine, but we would have run it two or three times if necessary to fix problems. The "-f" option is necessary on Panther to force the repair of a Journaled file system.


After a full system restart

shutdown -r now

we experienced the joy of the Setup Assistant and recreated the SAME user we had before. This being Unix, the same user name is not the same userid (numeric). The new user was "shocked" when we finished the assistant and none of his files were visible on the desktop.

A quick trip to the Terminal allowed us to go into the file system and repair the two system folders likely to have caused troubles for the new user:

sudo chown -R shortuser /Applications /Users/shortuser
sudo chgrp -R admin /Applications /Users/shortuser
exit

Finally, we logged out of Mac OS X (command-shift-Q) and logged back in.

Everything returned to normal. His files were his. His applications all worked. The computer now believes that all is well.

If this hadn't worked, the next step before a complete reinstall of the OS would have been to rename the short user name and put it back following the advice of Dan Frakes at:

http://homepage.mac.com/frakes/MOSXPT/content/shortusername.html

http://www.macworld.com/weblogs/macgems/2004/12/changeshortname/index.php



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: awesom on Jan 29, '08 05:00:14AM

Really nice tip.
Just remember to rm -R the user folder located in /Users/ if you want it completely clear of all recent users.
I use this system alongside an OpenSource server app called DeployStudio. To Deploy fresh System images to new or old machines. And I want those users to experience the same out-of-the-box feeling when buying a new Computer.



[ Reply to This | # ]
Resetting a Mac for disposal
Authored by: frogmella on Jul 08, '08 01:16:48AM

One thing to add: if you're doing this to put your Mac on eBay (or Freecycle if it's really that old!), you probably want to do this without re-running the assistant so that the new owner can run it for herself. In which case, instead of the final
exit
use the following instead:
shutdown -h now



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: debelah on Apr 03, '09 04:39:07AM

hey guys,

i tried this out on my macbook air but i keep getting the message:

single user mode: exit status 1
single user mode: exit status 1
Singleuser boot -- fsck not done
Root device is mounted read-only

... i feel like this poses a problem. is anybody able to help?

deb



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: debelah on Apr 03, '09 04:51:39AM

i tried it ONCE more without the 'netinfo' part as i'm using leopard and i still get these messages:

usage: mount [-dfruvw] [-o options] [-t ufs | external_type] special node
mount [adfruvw] [-t ufs | external_type]
mount [dfruvw] special | node

... i really have no idea what this means.



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: amacmedic on Nov 29, '09 04:25:36PM

Great tip! Now I don't have to reload the operating system to change owners.



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: longofest on May 25, '11 06:41:17PM

This is a great post, but it's a bit out-dated since Leopard (Mac OS 10.5) came out and did away with NetInfo Manager. The procedure for making a Mac OS X system look like new for Leopard and Snow Leopard is as follows:

1. Boot into single user mode (hold command-S during startup)
2. mount -uw / (this is to mount the filesystem as read/write. It is read-only by default)
3. cd /var/db/dslocal/nodes/Default
4. there will be many files in this directory, which you can see by typing "ls" or "ls -lh". Locate the files that represent YOUR user accounts and end in .plist and delete them by using the "rm" command. For instance, if my log-in name was "michael", I would type "rm michael.plist"
5. rm -r /Users/<your user directory>
6. rm /private/var/db/.AppleSetupDone (this makes the initial setup routine run again)
7. exit

At this point, your machine will exit out of single user mode and continue the boot process and should bring you to the initial setup utility. At this point, it is safe to force-powerdown your computer.

Note... the unix "rm" command permanently "removes" any file directory that you tell it to without asking for confirmation, so double-check your typing before pressing <enter>. However, if you are selling your computer, you probably want to use Disk Utility to erase and zero out your disk before you re-install Mac OS X and install the updates to make sure your data isn't easily recoverable.



[ Reply to This | # ]
Make OS X re-run the initial setup assistant
Authored by: starterat on Jul 19, '13 07:38:14PM

Hey guys, I have tried the commands in sum but I am stuck on the create a new account screen. It goes until I hit the create button but the wheel stops and the setup restarts.



[ Reply to This | # ]