|
Written by Philip Rinehart
|
|
Friday, 29 October 2004 |
In Panther, dscl was introduced as the Command Line tool to access Directory Services information. The information can be the local NetInfo directory, or any other directory to which your machine is bound.
What if you need to connect to and LDAP server, and the server has the backslash (/) character in the directory service path? The answer is in the dscl manual:
If path components contain keys or values with embedded slash characters, the slash characters must be escaped with a leading backslash character. Since the shell also processes escape characters, an extra backslash is required to correctly specify an escape.
For example, to read a mount record with the name "ldapserver:/Users" in the "/Mounts" path, the following path would be used:
dscl . -read /Mounts/ldaphost:\\/Users
|