2.6 Setting up a NetInfo Master (10.1 client)

NetInfo is the method by which OS X stores user account information.

If you wish to share user account information between multiple OS X servers or clients - then you should set up at least one machine as a NetInfo Master.

The following describes how you can set up a client machine as a NetInfo master.

Before you start, enable the root account as described in "2.4 Disabling auto-login and enabling root (10.1 client)".

Log-in as root.

 
Launch a text editor.  
Open the file "/etc/hostconfig"  

Change HOSTNAME from "-AUTOMATIC-" to the same as the APPLETALK_HOSTNAME

Change AFPSERVER to "-YES-"

Change NETINFOSERVER to "-YES-"

Save the file and quit the editor.
Restart the machine.
Log-in as root and start a new shell.

Type the following into the shell:

niutil -create -t localhost/local /machines/your_hostname
niutil -createprop -t localhost/local /machines/your_hostname ip_address your_hosts_ip
niutil -createprop -t localhost/local /machines/your_hostname serves ./local
nidomain -m network
niutil -create -t localhost/network /users
niutil -create -t localhost/network /users/root
niutil -createprop -t localhost/network /users/root uid 0
niutil -createprop -t localhost/network /users/root gid 0
niutil -createprop -t localhost/network /users/root passwd "`niutil -readprop -t localhost/local /users/root passwd`"
niutil -appendprop -t localhost/network /machines/your_hostname serves "your_hostname/local"
niutil -appendprop -t localhost/local /machines/your_hostname serves "your_hostname/network"

Replace "your_hostname" with the name that you defined in the "hostconfig" file, and replace "your_hosts_ip" with the IP address of your machine (see opposite for an example).

Launch "Directory Setup".  
Click on the lock at the bottom of the screen to indicate that you wish to make changes.
Type in the administrators name and password and click "OK".
Notice that the padlock is now unlocked.  
Under the "Services" tab, tick the box next to "NetInfo".
An alert box will appear informing you that you have to restart to make any changes effective... click "OK".
Cick the "Configure..." button.

On the configuartion screen...

Untick the box next to "Attempt to connect using Broadcast protocol".

Untick the box next to "Attempt to connect using DHCP protocol".

Tick the box next to "Attempt to connect to a specific NetInfo server".

Enter your server address in the "Server Address:" field.

Enter "network" in the "Server Tag:" field.

Click the "OK" button.

Quit "Directory Setup".  
Restart your machine.  

ADDENDUM

It seems that in order to get NetInfo to work consistantly, a DNS server must be defined in the Network System Settings - also if a proxy is defined, your IP subnet must be declared in the proxy exceptions.

Do this on every machine (client and server).

Mac OSX server - tech notes - © 2002 by Mark J Swift - msw AT blackpool.ac.uk