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

Make NetInfo recreate its databases Apps
NetInfo can occasionally get cranky, especially if you have been mucking around with it. If you have hosed your netinfo database you can force the machine to rebuild it.

In single-user mode (boot while holding down command-S, or see the tip here on how to quit into single-user mode), remove /var/db/local.nidb, which is your local netinfo database. Also remove /var/db/.AppleSetupDone, then reboot. You will see a registration page again and can create a new admin account and go from there. Be careful to remap your privileges if necessary.

Also, if you are having problems with the database, but don't want to trash the whole thing, you can just remove /var/db/.AppleSetupDone and reboot. Go through the registration and create a new account with a DIFFERENT name than any you already have. This doesn't recreate the database, it just adds a new admin user to it.
  • Currently 2.38 / 5
  You rated: 1 / 5 (8 votes cast)

Make NetInfo recreate its databases | 8 comments | Create New Account
Click here to return to the 'Make NetInfo recreate its databases' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
What does this do, exactly?
Authored by: Anonymous on Apr 22, '01 04:44:47PM

What does this do? What kind of info am I erasing? NetInfo seems to track a lot of different kinds of data.

[ Reply to This | # ]
important difference
Authored by: Anonymous on Apr 22, '01 07:01:08PM

Removing the netinfo database and the .AppleSetupDone flag will change a significant number of things on your system. You will lose all of your users, for one, and other things like nfs exports and imports. However if you have messed up your database a re-install of the system won't fix it. Your only other option is to re-format and install. Just removing .AppleSetupDone will keep your database intact but allow you to add another user even if you have forgotten, lost, or for some reason unable to get into your other accounts.

[ Reply to This | # ]
important difference
Authored by: Tony Foster on Feb 12, '07 07:29:31PM

Dear Mactroll
I have a problem with Photoshop CS2 failing to open/import files. A dialogue box ‘Could not complete your request because of a program error' appears irrespective of file type or file location.

Adobe direct me to Tech Note 331307, item 2., which details behaviours and options for repair. In my case I have established that the problem disappears if I open a new user account and open Photoshop via the new account.

This suggests a corruption in my old user account.
I have installed and archived OS10.3.9 and updated system. Bug remains in old account.
In single user mode I have run fsck -f and also replaced /var/netinfo/local.nidb. and AppleSetupDone. Bug remains.

I want to avoid re-formatting my disk and a clean install as the rebuild and transfer of preferences for applications is a big job.

Can you suggest a fix to clean the old user account via Unix terminal? Or am I stuck with the reformatting option. If reformatting what is the best way to retain or transfer Bookmarks, History in Foxfire, OmniWeb and Safari and Address book data.

PS Adobe Tech note suggests corrupted fonts are one source of this problem so fonts have been analysed and fixed with Font Doctor and removed fonts deleted. Problem remains in old account.

I would appreciate any help you can suggest.
Yours Sincerely,
Tony Foster

[ Reply to This | # ]
Wish I'd known this this morning!
Authored by: Anonymous on Apr 22, '01 08:10:55PM
I mucked around with NetInfo, and I paid the price. Freeze at the bluescreen between boot panel and login window. I tried a bunch of stuff, including deleting the netinfo database. This let me get to the login window - but I had no accounts! I restored from another machine, and had to change my users, etc.

Then I get back on line and this tip is here. Just my luck. =(

To everyone not afraid of the Terminal! Backup your NetInfo!

% sudo tar cvf netinfo.tar /var/db/netinfo/

If you ever have trouble, boot into single-user and type:

fsck -y

% mount -uw / (It tells you to do both of these)

% rm -R /var/db/netinfo/

% tar xvf /var/db/netinfo.tar

% sync

% sync (Yes, twice)

% shutdown -r now (It says shutdown, but it will reboot)

That should do it.

[ Reply to This | # ]
Authored by: Anonymous on Apr 22, '01 08:24:47PM

typo. when I referenced /var/db/local.nidb I meant /var/db/netinfo/local.nidb


[ Reply to This | # ]
Will this work for a deleted root?
Authored by: rage on Feb 04, '02 10:11:24AM

Will this method work if you ACCIDENTLY deleted you root? (damn) Heh, I'm in a real pit and I'm trying to get out without reformatting or re-installing the whole thing. Please help...

[ Reply to This | # ]
This tip saved my bacon
Authored by: Loan iRanger on May 08, '02 03:27:21AM
My beige G3 crashed while downloading a large file, but after restart, it wouldn't boot beyond the "Starting Network Services" message. By a stroke of luck, I had a back-up of my /var/db/local.nidb, and after reading this tip, I simply replaced it and was on my merry way.

The moral of the story: if you haven't made a back-up of this directory, do it now.

[ Reply to This | # ]
This tip saved my bacon
Authored by: Loan iRanger on May 08, '02 03:38:16AM
Oops - I must have the mactroll disease. Of course I really meant

[ Reply to This | # ]