Playing with Mac OS X 10.5 Leopard local directory service
November 6th, 2007
New with Mac OS X 10.5 is the replacement of the old NetInfo architecture. The new component, Directory Services, is a highly configurable service that can use many back-ends to store, retrieve and abstract concepts like users, groups, machines or mount points.
Directory Services sports LDAP, Active Directory and Open Directory support, and also local files. Local files seem to be stored directly in the root volume, in the /var/db/dslocal/nodes/Default/ directory. Within this subdirectory, we can found others that create a tree-like, hierarchical structure:
aliases/. Contains a one pList for every account alias that is registered in the Local directory service. There are some built-in aliases, plus additional aliases that can be created from the Accounts preference pane.config/. Contains several configuration files for components like Kerberos KDC (in a pretty funny format, that basically looks like XML-syntax wrapper that contains the traditional kdc.conf text-based configuration file as a string), Share points and so on.groups/. Contains one pList file for every known local group. The format is pretty straightforward and almost resembles the traditional UNIX/etc/groupfile, but expressed using XML.machines/. Contains one pList file for every known machine. It seems to me this is the equivalent of the/etc/hostsUNIX file where each machine entry is stored in as a single pList file. For a default Mac OS X installation, you will find a localhost.plist and a broadcasthost.plist entry.mounts/. Contains one pList for every automount point. By default, there are no automount points defined, and they can be created using the Directory Utility application,dsclor by manually creating or changing pList files.networks/. Contains one pList file for every known network. This seems like the equivalent of/etc/ethersin UNIX systems. By default, only a single pList file exists: loopback.plist, which lists 127.0.0.0/8 as a known network.users/. Contains one pList file for every known local user. This is the equivalent of/etc/passwdin any UNIX system. As in modern UNIX systems, the password is stored somewhere else (does anybody know where?).
By tweaking these files and restarting the Directory Service, it is possible to emulate the behavior of a UNIX-like system, with the difference that access to these entities is mediated by a service, as is not exposed via a POSIX API that, when configured to use local files, parses the contents of local files. In Mac OS X, it is necessary to notify the Directory Service when the contents of any of the pList files changes.
Another way of editing some of these components without having to use dscl or editing pList files by hand is by right-clicking a user or a group in the Accounts preference pane, then choosing Advanced Options ... from the menu.
December 4th, 2007 at 11:57 AM
[...] http://www.felipe-alfaro.org/blog/2007/11/06/playing-with-mac-os-x-105-leopard-local-directory-servi... http://andyjarrett.co.uk/andy/blog/index.cfm/2007/11/1/NetInfo-manager-and-HOST-file-in-Leopard [...]
September 11th, 2009 at 4:25 AM
Hi! I was surfing and found your blog post… nice! I love your blog.
Cheers! Sandra. R.
June 26th, 2011 at 5:33 AM
Hi there,
Thank you for your good article. I m interested and i learned something about it. I ll try to follow all articles as much as i can.
The world is growing up with sharing.
November 28th, 2011 at 5:37 AM
Always a pleasure. Rather link to you than someone else!
December 21st, 2011 at 6:36 PM
Oh, we’re going to smoke the shit out of Baylor.
January 5th, 2012 at 9:56 PM
Hey! I think the page is of value to my visitors, and so I just put a link on my website back to your site. Hope you like that
.Please check the backlink at http://ultimatedemonbonus.org/other-sites-we-like/
January 9th, 2012 at 12:50 PM
It’s why I’m such a big fan of Aerosmith. Thank you, boobular girl one row in front of me!
January 9th, 2012 at 4:26 PM
After study a few of the blog posts on your website now, and I truly like your way of blogging. I bookmarked it to help my bookmark website list and will also be checking back soon. Pls check out my web site as well and well then, i’ll know what you believe.
January 20th, 2012 at 4:39 PM
Houttar, I am sorry to hear about your misfortunes but I am unable to proceed with any activities that may be, in any way, illegal. I think you should look into some ninja like assassination techniques to rid your kingdom of the betrayer.