dscl [datasource]
Directory Service command line utility
Arguments
Name | Description |
---|---|
datasource |
Subcommands
Name | Description |
---|---|
read, -read | Prints a directory |
readall, -readall | Prints all the records of a given type |
readpl, -readpl | Prints the contents of plist_path |
readpli, -readpli | Prints the contents of plist_path for the plist at value_index of the key |
list, -list, ls, -ls | Lists the subdirectories of the given directory |
search, -search | Searches for records that match a pattern |
create, -create, mk, -mk | Creates a new record |
createpl, -createpl | Creates a string, or array of strings at plist_path |
createpli, -createpli | Creates a string, or array of strings at plist_path for the plist at value_index of the key |
append, -append | Appends one or more values to a property in a given record |
merge, -merge | Appends one or more values to a property in a given directory if the property does not already have those values |
delete, -delete, rm, -rm | Delete a directory, property, or value |
deletepl, -deletepl | Deletes a value in a plist |
deletepli, -deletepli | Deletes a value for the plist at value_index of the key |
change, -change | Replaces the given old value in the list of values of the given key with the new value in the specified record |
changei, -changei | Replaces the value at the given index in the list of values of the given key with the new value in the specified record |
diff, -diff | Compares the data from path1 and path2 looking at the specified keys (or all if no keys are specified) |
passwd, -passwd | Changes the password of a user |
Options
Name | Description |
---|---|
-p | Prompt for password |
-u <user> | Authenticate as user |
-P <password> | Authenticate with password |
-f <file> | Targeted local node database file path |
-raw | Don't strip off prefix from DirectoryService API constants |
-plist | Print out record(s) or attribute(s) in XML plist format |
-url | Print record attribute values in URL-style encoding |
-q | Quiet - no interactive prompt |