Apple OS X manual Directory Service Command Line Utility, Debugging

Page 24

C H A P T E R 1

Concepts

In this example, lookupd queries its local cache and NetInfo, and gets negative responses — “tjones” could not be found in either location. Now, lookupd tells its DSAgent to query Open Directory. Searching the local NetInfo database is the first step in every Open Directory search, so Open Directory tells its NetInfo plug-in to search the local NetInfo database. Again, “tjones” is not found. In this case, Open Directory is configured to conduct LDAP searches next, so Open Directory tells its LDAP plug-in to search for “tjones” in the remote LDAP servers that it knows about. This time, “tjones” is found in ldap.myplace.com.

In summary, lookupd calls Open Directory when its local cache and NetInfo cannot find an answer. Whether Open Directory is called by lookupd or called by another application, Open Directory always searches its local NetInfo database first and then conducts other searches using whatever search technology it has been configured to use. Most of the time, that search technology is LDAP.

Directory Service Command Line Utility

The directory service command line utility, dscl, operates on Open Directory nodes. It is similar to the nicl utility, which only operates on NetInfo nodes. The dscl utility’s options allow you to create, read, and manage Open Directory data. For more information on the dscl utility, see the man page for dscl.

Debugging

You must be root to enter the DirectoryService killall commands that enable and disable debug logging. The following command, run by root, enables debug logging if debug logging is currently off and disables debug logging if debug logging is currently on:

killall -USR1 DirectoryService

Debugging output is sent to /Library/Logs/DirectoryService/DirectoryService.debug.log. Debugging output includes input to Open Directory API calls, results, and timing, plus any debug information output by Open Directory plug-ins.

The following command, run by root, enables debug logging to /var/log/system.log if debug logging is currently off and disables debug logging if debug logging is currently on:

killall -USR2 DirectoryService

When debug logging is enabled by -USR2, debug output includes API call results and timing. Debug logging enabled by -USR2is turned off automatically after five minutes.

24Directory Service Command Line Utility

2007-01-08 © 2007 Apple Inc. All Rights Reserved.

Image 24
Contents Open Directory Programming Guide Apple Inc Contents N T E N T S Figures, Tables, and Listings G U R E S , T a B L E S , a N D L I S T I N G S Organization of This Document See AlsoIntroduction See Also Concepts Open Directory OverviewNodes 1Flow of an Open Directory request2An Open Directory request over a network Search Policies and Search Nodes Record TypesConstant Description Standard Attribute Types Standard attribute for storing a unique ID commonly foundAuthentication Native Attribute TypesBasic Authentication Open Directory Overview Local Windows Hash Authentication Local Cached User Authentication Disabled User Authentication Directory Native Authentication Directory ProxyOpen Directory, lookupd, and NetInfo 3lookupd and NetInfo interaction when using SSH Directory Service Command Line Utility DebuggingWorking with Nodes Listing Registered NodesWorking with Nodes Finding a Node Opening and Closing a Node Authenticating a User to a Node Directory Native Authentication Authenticating using directory native authenticationWorking with Nodes Working with Nodes Authenticating a User to a Node Working with Records Listing RecordsListing Records Getting Information About a Record’s Attribute Working with RecordsGetting Information About a Record’s Attribute Setting the Name of a Record Working with Records Listing 3-3Setting the name of a record Creating a Record and Adding an Attribute Void CreateRecord const tDirNodeReference inDirNodeRef Deleting a Record Working with Records Document Revision History Document Revision History
Related manuals
Manual 32 pages 7.58 Kb