Skip to Main Content
Mac OS X for Unix Geeks
book

Mac OS X for Unix Geeks

by Ernest E. Rothman, Brian Jepson
September 2002
Beginner to intermediate content levelBeginner to intermediate
216 pages
7h 43m
English
O'Reilly Media, Inc.
Content preview from Mac OS X for Unix Geeks

Restoring the NetInfo Database

If the NetInfo database is damaged, boot into single-user mode by holding down ⌘-S as the system starts up. Next, check to see if you have a backup of the NetInfo database. The /etc/daily cron job backs up the NetInfo database each time it is run. You can find the backup in /var/backups/local.nidump. If you don’t have a backup, you won’t be able to restore the NetInfo settings. The local.nidump file is overwritten each time the cron job runs, so make sure you back it up regularly (preferably to some form of removable media).

Warning

If your computer is generally not turned on at 3:15 a.m. (the default time for the daily cron job), you’ll never get a backup of your NetInfo database. You can solve this problem by editing /etc/crontab to run this job at a different time, or to run the job periodically with the command sudo periodic daily. See Section 2.3.1 in Chapter 2 for more details.

After the system boots in single-user mode, you should:

  1. Log in as the root user.

  2. Fix any filesystem errors:

    # /sbin/fsck -y
  3. Mount the root filesystem as read/write:

    # /sbin/mount -uw /
  4. Change directories and go to the NetInfo database directory:

    # cd /var/db/netinfo/
  5. Move the database out of the way and give it a different name:

    # mv local.nidb/ local.nidb.broken
  6. Switch directories and go to the StartupItems directory:

    # cd /System/Library/StartupItems
  7. Start the network:

    # ./Network/Network start
  8. Start the port mapper, since NetInfo depends on it. Ignore any warnings about a missing ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X For Unix Geeks, 4th Edition

Mac OS X For Unix Geeks, 4th Edition

Ernest E. Rothman, Rich Rosen, Brian Jepson
Mac OS X Hacks

Mac OS X Hacks

Kevin Hemenway, Rael Dornfest
Mac OS X in a Nutshell

Mac OS X in a Nutshell

Jason McIntosh, Chuck Toporek, Chris Stone

Publisher Resources

ISBN: 0596003560Errata Page