• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

niutil

niutil

niutil NetInfo utility.
niutil -create [opts] <domain>
									<path>
niutil -destroy [opts] <domain>
									<path>
niutil -createprop [opts] <domain>
									<path>
									<key>
								[<val>...]
niutil -appendprop [opts] <domain>
									<path>
									<key>
								<val>...
niutil -mergeprop [opts] <domain>
									<path>
									<key>
								<val>...
niutil -insertval [opts] <domain>
									<path>
									<key>
								<val>
									<index>
niutil -destroyprop [opts] <domain>
									<path>
									<key>
niutil -destroyval [opts] <domain>
									<path>
									<key>
									<val>
niutil -renameprop [opts] <domain>
									<path>
									<oldkey>
								
									<newkey>
niutil -read [opts] <domain>
									<path>
niutil -list [opts] <domain>
									<path>
niutil -rparent [opts] <domain>
niutil -resync [opts] <domain>
niutil -statistics [opts] <domain>
								

					  

niutil allows you to perform arbitrary reads and writes on the specified NetInfo <domain>. To perform writes, niutil must be run as root on the NetInfo master for the database, unless -p, -P, or -u is specified.
The directory specified by <path> is separated by / characters. A numeric ID may be used for a path in place of a string. Property names may be given in a path with an =. The default property name is name. The following examples both refer to a user with user ID 3:
/name=users/uid=3
/users/uid=3/

Options:  
-t <host>/<tag> Interprets the domain as a tagged domain. For example, parrish/network is the domain tagged network on machine parrish.
-p Prompts for the root password or the password of <user> if combined with -u.
-u <user> Authenticates as <user>. Implies -p.
-P <password> Provides the root password or the password of <user> if combined with -u. Overrides -p.
-T <seconds> Sets the read and write timeout to <seconds>. Default is 30 seconds.
Operations:  
-create <domain> <path> Creates a new directory with the specified path.
-destroy <domain> <path> Destroys the directory with the specified path.
-createprop <domain>
									<path>
									<key> [<val>...]

Creates a new property in the directory <path>. <key> is the name of the property. 0 or more property values may be specified. If the named property already exists, it is overwritten.
-appendprop <domain>
									<path>
									<key>
									<val>...
								

Appends new values to an existing property in directory <path>. <key> is the name of the property. 0 or more property values may be specified. If the named property does not exist, it is created.
-mergeprop <domain>
									<path>
									<key>
									<val>...
								

Merges new values into an existing property in the directory <path>. <key> is the name of the property. 0 or more property values may be specified. The values are appended to the property only if they do not already exist. If the named property does not exist, it is created.
-insertval <domain>
									<path>
									<key>
									<val>
									<propindex>.
								

Inserts a new value into an existing property in the directory <path> at position <propindex>.<key> is the name of the property. If the named property does not exist, it is created.
-destroyprop <domain>
									<path>
									<key>
								

Destroys the property with name <key> in the specified <path>.
-destroyval <domain>
									<path>
									<key>
									<val>
								

Destroys the specified value in the property named <key> in the specified <path>.
-renameprop <domain>
									<path>
									<oldkey>
									<newkey>
								

Renames the property with name <oldkey> in the specified <path>.
-read <domain> <path> in the specified <domain>. Reads the properties associated with the directory <path>
-list <domain> <path> Lists the directories in the specified <domain> and <path>. Directory IDs are listed along with directory names.
-readprop <domain>
									<path>
									<key>
								

Reads the value of the property named <key> in the directory <path> of the specified <domain>.
-readval <domain>
									<path>
									<key>
									<index>
								

Reads the value at the given index of the named property in the specified directory.
-rparent <domain> Prints the current NetInfo parent of a server. The server should be explicitly given using the -t <host>/<tag> option.
-resync <domain> Resynchronizes NetInfo. If a domain name is given, the master resynchronizes all clones. If the -t <clone>/<tag> option is used instead, only that clone is resynchronized. Using -t <master>/<tag> resynchronizes the whole domain.
-statistics <domain> Prints server statistics on the specified <domain>.
-domainname <domain> Prints the domain name of the given domain.
<domain> If the value is .for <domain>, it is referring to the local NetInfo database.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint