Manual Pages for UNIX Darwin command on man nicl
MyWebUniversity

Manual Pages for UNIX Darwin command on man nicl

nicl(1) BSD General Commands Manual nicl(1)

NAME

nniiccll - NetInfo command line utility

SYNOPSIS

nniiccll [options] datasource [command] options:

-cc create new datasource

-rroo read-only

-pp prompt for password

-uu user authenticate as user

-PP password authentication password

-rraaww datasource is a NetInfo directory

-tt datasource is host/tag

-vv verbose output

-qq quiet - no interactive prompt

-ii Ask for confirmation before deleting directories

-xx550000 X.500 names

commands:

-rreeaadd dir [key ...]

-lliisstt dir [key]

-sseeaarrcchh dir scopemin scopemax key val [key val] ...

-ppaatthh dir

-llooaadd [delim key val ...] ...

-ccrreeaattee [path [key [val ...]]]

-aappppeenndd dir key val ...

-mmeerrggee dir key val ...

-iinnsseerrtt dir key val index

-rreennaammee dir oldkey newkey

-ddeelleettee dir [key [val ...]]

-ccooppyy dir newparent

-mmoovvee dir newparent

-ssoouurrccee file

-eecchhoo string

-hhiissttoorryy [<=>] [version]

-ssttaattiissttiiccss

-ddoommaaiinnnnaammee

-rrppaarreenntt

-rreessyynncc

-fflluusshh

available only in interactive mode:

-ccdd dir

-ppwwdd

-aauutthh [user [password]]

-qquuiitt

support for experimental X.500 mode:

-rreeffss

-sseettrrddnn dir key

DESCRIPTION

nniiccll is general-purpose utility for operating on NetInfo databases. Its

commands allow one to create, read, and manage NetInfo data. If invoked without any commands, nniiccll runs in an interactive mode, reading commands from standard input. Interactive processing is terminated by the quit

command, or by end of file. Leading dashes ("-") are optional for all

commands. nniiccll operates on a datasource specified on the command line. This may be a domain name, a NetInfo server of the form "host/tag", or a file.

Domain names may be absolute paths beginning with a slash ("/"), or rela-

tive domain paths beginning with a dot (".") character, which specifies the local domain, or "..", specifying the local domain's parent. If the

-tt option has been specified, then the datasource is a host/tag specifi-

cation. Hosts may be given by name or IP address. If the -rraaww option

has been specified, then the datasource is a NetInfo-format database, for

example "/var/db/netinfo/local.nidb". The user invoking nniiccll must have

sufficient file-system permissions to read the database files.

In "raw" mode, nniiccll operates directly on the database without communicat-

ing with a server for that database. DDIIRREECCTTOORRYY SSPPEECCIIFFIICCAATTIIOONN

Many commands take a directory as an option. Directories may be speci-

fied as a directory ID number or as a path. NetInfo paths are specified

by a list of slash-separated components. Each component is of the form:

value or key=value In the first form, the key defaults to "name". Thus the following two paths are equivalent: /users/alice /name=users/name=alice Note that NetInfo does not require any key to have unique values. When matching a directory path, NetInfo will match the first directory it finds with a given key and value. For example, the following path will locate a user with a gid of "100": /users/gid=100 Many users may have a gid value of 100. This path will match the first in some search order. The only unique identifier for NetInfo directories is the directory ID number. This number is printed in the output of the list command, and is printed by the read command if the nniiccll is invoked

with the -vv (verbose) flag.

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 direc-

tory with the name "/Alpha" in the "/exports" directory, one of the fol-

lowing paths could be used:

nniiccll . -rreeaadd /exports/\\/Alpha

nniiccll . -rreeaadd /exports/name=\\/Alpha

XX..550000 MMOODDEE nniiccll was developed using an internal datastore "engine" with operations supporting both the legacy NetInfo network protocol and LDAP Version 3. Development work is still in progress in this area. Some nniiccll commands

have been written for use in "X.500" mode, invoked by use of the -xx550000

flag. Support for X.500-style data organization, naming, and access is

still experimental and under active development. CCOOMMMMAANNDDSS The action of each command is described below. Some commands have aliases. For example, "cat" and "." are aliases for "read". Command aliases are listed in parentheses. rreeaadd ((ccaatt ..)) Usage: read dir [key ...]

Prints a directory. Each properties are printed one per line. The prop-

erty key is followed by a colon, then a space-separated list of the val-

ues for that property. Note that a value which contains embedded spaces

will appear identical to a pair of values. If The -vv flag for verbose

output has been given, then read prints the directory (record) ID number, its version number, serial number, a count of child directories and a list of child directory ID numbers. Attributes are printed separately

from meta-attributes (those having a leading underscore character).

lliisstt ((llss)) Usage: list dir [key] Lists the subdirectories of the given directory. Subdirectories are listed one per line. The directory ID number is printed first, then the values of "name" key. If an optional key argument is given, then the values for that key are used, rather than the values for the "name" key. Note that subdirectories that do not have a "name" key (or the key given as an option) are not listed. sseeaarrcchh path scopemin scopemax key val [key val] ... Searches for directories that match a pattern. The search is rooted at the given directory. The following two arguments control the scope of the search by specifying the starting and ending depth of the search. If scopemin argument is 0, for example, the search will include the starting

directory itself. A value of 1 will start searching at the subdirecto-

ries of the starting directory. The value of scopemax specifies the max-

imum depth of the search. A value of 0 stops the search at the starting

directory. A value of 1 stops the search one level down. A value of -1

causes the search to have no maximum depth. Following the scope arguments are one or more key and value pairs. Directories that have matching keys and values will be printed. ppaatthh Usage: path path Prints the directories from the given directory to the root directory. llooaadd Usage: load [delim key val ...] ... Creates a child directory of the current directory. This command allows

a directory to be created with a number of properties. The first charac-

ter given in the input is subsequently used as a delimiter to separate key val ... sets. For example, to create a directory with the name "foo", and a property "bar" with the values "a", "b", and "c", and a property "baz" with the values "abc" and "def": load + name foo + bar a b c + baz abc def Any single character may be used as a delimiter. ccrreeaattee ((mmkk)) Usage: create [path [key [val ...]]] Creates a new directory, property, or value. If a directory path is given, the create command will create the directory path if it does not exist. If a key is given, then a property with that key will be created.

WARNING - If a property with the given key already exists, it will be

destroyed and a new property will be created in its place. To add values to an existing property, use the append or merge commands. If values are included in the command, these values will be set for the given key.

If it is invoked without any arguments as a single command-line argument

to nniiccll , the create command will create a new database. For example, to create a new database "/tmp/testdb":

nniiccll -rraaww /tmp/testdb -ccrreeaattee

The "mk" alias is not available for creating a new database. Note that a

new database may also be created by using the -cc option on the command

line. aappppeenndd Usage: append path key val ...

Appends one or more values to a property in a given directory. The prop-

erty is created if it does not exist. mmeerrggee Usage: merge path key val ... Appends one or more values to a property in a given directory if the property does not already have those values. The property is created if it does not exist. iinnsseerrtt Usage: insert path key val index Inserts the given value in the list of values of the given key in the specified directory. index is an integer value. An index of 0 specifies that the value should be inserted at the head of the list. An index greater than the number of values in the list causes the value to be appended. The property is created if it does not exist. rreennaammee Usage: rename path oldkey newkey Changes a property key. ddeelleettee ((rrmm)) Usage: delete path [key [val ...]] Delete a directory, property, or value. If a directory path is given, the delete command will delete the directory. If a key is given, then a property with that key will be deleted. If one or more values are given, those values will be removed from the property with the given key. ccooppyy ((ccpp)) Usage: copy path newparent Recursively copies a directory to a new parent directory. mmoovvee ((mmvv)) Usage: move path newparent Moves a directory to a new parent directory. In raw mode, move moves a

directory by detaching it from its parent directory and re-attaching it

to a new parent. When connected to a NetInfo server, the directory is recursively copied to the new parent directory, then the original is removed. hhiissttoorryy ((hhiisstt)) Usage: history [<=>] [version] Locates directories by reference to the database version number. When a new database is created, it starts with a version number of zero. Each modification of the database causes the version number to be incremented. The database version number is saved with the directory that was modified at that time. When a directory is added or removed, the parent directory is modified, and thus the parent directory carries the version number for that modification. The history command lists directories that have been modified before, at, or after a specific version of the database. The < argument is used to

locate directories that changed before a specific version. The > argu-

ment locates directories that changed after a specific version. The = after locates the single directory that changed at a specific version. This is also the default if none of these arguments is given. If a version number is omitted, the current database version number is used. To determine the current database version:

nniiccll . -hhiissttoorryy

ssttaattiissttiiccss ((ssttaattss)) Usage: statistics Prints various statistics. If the datasource is a raw database this

includes the database checksum, version number, maximum directory ID num-

ber, and counts of fetch, save, and remove operations. If the datasource is a NetInfo server, then this command prints all statistics available from the server. ddoommaaiinnnnaammee ((nnaammee)) Usage: domainname Prints the NetInfo domain name. Not available in raw mode. rrppaarreenntt Usage: rparent Prints the IP address and tag of the server's parent domain server. No output is printed if the server has no parent. Not available in raw mode. rreessyynncc Usage: resync If connected to a NetInfo clone server, this command causes the clone to

check its database and re-synchronize with the master if necessary. If

connected to a master server, this command causes the master to send a

message to all clones, causing them all to re-synchronize. Not available

in raw mode. fflluusshh Usage: flush Flushes the directory cache. eecchhoo Usage: echo string Prints the string to standard output. This is handy when executing a script. ssoouurrccee ((<<)) Usage: source file Redirects standard input to read commands from the named file. After the commands in the file have been processed, control returns to the command line (if invoked interactively). IINNTTEERRAACCTTIIVVEE CCOOMMMMAANNDDSS ccdd Usage: cd dir Sets the current directory. Path names for other nniiccll commands may be relative to the current directory. ppwwdd Usage: pwd Prints the path of the current directory. aauutthh ((ssuu)) Usage: auth [user [password]] Authenticate as the named user, or as "root" if no user is specified. If a password is supplied, then that password is used for authentication, otherwise the command prompts for a password. qquuiitt ((qq eexxiitt)) Usage: quit Ends processing of interactive commands and terminates the program. XX..550000 MMOODDEE CCOOMMMMAANNDDSS rreeffss

Usage: refs Used with -xx550000 mode. Lists parent domain and child domain

references. Domains are printed as LDAP URLS. sseettrrddnn Usage: setrdn path key

Used with -xx550000 mode. This command creates a meta-attribute "rdn" key in

the specified directory, with the key as the value of the "rdn" meta-

attribute. When nniiccll is invoked with the -xx550000 flag, X.500-style naming

is used. The "rdn" meta-attribute of a directory specifies which key

will be used for the relative distinguished name (RDN). By default, the "name" property is used to form the RDN. FILES /var/db/netinfo/*.nidb

SEE ALSO

nidump(8), nifind(1), nigrep(1), niload(8), nireport(1), niutil(1) Mac OS December 15, 2000 Mac OS




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™