How does the defaults domain ‘Network’ work? (/Network/Library/Preferences/)
How does the Network preference/defaults domain work on Mac OS? I see it referenced in a lot of Apple documentation, but I don’t understand this particular preference domain.
I get the user defaults in ~/Library/Preferences, and the administrator-provided defaults in /Library/Preferences. But the Network domain puzzles me.
The preferences system stores preference data in files located in the Library/Preferences folder in the appropriate file-system domain. For example, if the preference applies to a single user, the file is written to the Library/Preferences folder in the user’s home directory. If the preference applies to all users on a network, it goes in /Network/Library/Preferences. (source)
Can anyone reference some use-case based documentation? or explain how it works?
Will other Macs on the same network magically start respecting the Network preferences?
Solution 1:
The network library is intended for client computers bound to a network domain server. A domain server acts as a central repository for configuration information -- mostly user accounts, but also (among other things) mount records. Mount records tell the client computers to automatically mount a certain file server share point automatically. If you use this to tell all the clients to mount a particular share point on /Network/Library, then you can put Preferences, Fonts, etc folders inside that share point and they'll be automatically available on all clients in the network domain.
This used to be a common way to manage network clients in NextStep (the predecessor of OS X), but is very rarely used in OS X. There are better ways to do most thing now, like putting managed preference settings directly in the network domain. At this point, the network library is more of a historical artifact than anything else...
Solution 2:
The /Network
domain is just another of the operating system’s domain for storing settings, frameworks, plugins, etc. Here’s the search order of domains:
- User (a user’s home directory—
~
; a typical folder is~/Library/Fonts
) - Local (root level folders such as
/Applications
,/Library
) - Network (
/Network
is a mount point for shared resources; see below) - System (everything beneath
/System
)
/Network
is the place to put things that you want each user who logs onto your server (or accesses your network filesystem) to have access to without installing them for each user. For example, if you support a bunch of programmers, you can put coder-friendly fonts (Anonymous Pro, Vera Sans Mono, Inconsolata, etc.) in /Network/Library/Fonts
. PreferencePanes, plugins, ColorPickers and the like would go into their respective folders within /Network/Library
.
Apple documents this in their File System Overview document.