Leopard vs NetInfo

As I’m sure you’re all aware, NetInfo is gone in Leopard, replaced by plist files living in /var/db/dslocal. This might present issues if you are migrating users from Tiger machines to Leopard. Two scenarios for us:

1) If we use radmind to update a machine in-place from Tiger to Leopard, we’ll need a way to convert any local user accounts from the NetInfo database to the new dslocal store.

2) If you migrate user data and accounts from a Tiger machine to a Leopard machine (and you don’t want to use Apple’s Migration Assistant, or can’t), again, you might need to convert NetInfo user account info to dslocal.

As it turns out, even though NetInfo is gone, its ghost lives on in Leopard. In /System/Library/PrivateFrameworks is the NetInfo.framework. This provides most of the plumbing needed by higher-level tools. Of specific interest is “nicl”, which has the ability to work with “raw” NetInfo database files. If you copy /usr/bin/nicl from a Tiger installation to a Leopard machine and point it at a NetInfo database file – it will work just fine:

aquaman:Resources root# /tmp/nicl -raw /Volumes/Tiger/private/var/db/netinfo/local.nidb -list /users
11 nobody
12 root
13 daemon
14 unknown
15 lp
16 uucp
17 postfix
18 www
19 eppc
20 mysql
21 sshd
22 qtss
23 cyrusimap
24 mailman
25 appserver
26 clamav
27 amavisd
28 jabber
29 xgridcontroller
30 xgridagent
31 appowner
32 windowserver
33 tokend
34 securityagent
95 admin

This might be useful in a script to import local users from a Tiger installation into a new Leopard install.

Leopard vs NetInfo

3 thoughts on “Leopard vs NetInfo

  1. djidjiperroto says:

    While helpful this still leaves netinfo users out in the cold. While ‘possible through scripting’, as of this post there is no tool that will allow the full conversion of a local netinfo user to open directory. AFAIK the way to do is to manually delete the local users and re-create them in OD.

Comments are closed.