nsadmin(1M) nsadmin(1M) NAME nsadmin - Name Service Administration Utility SYNOPSIS nsadmin [command] [arguments] DESCRIPTION The nsadmin utility is used for administration of the Unified Name Service interface (see nsd(1m)). The nsd daemon maintains a filesystem typically mounted on /ns using various directory service protocols to provide information. It also maintains local cache files for each lookup. The nsadmin command allows manipulation of the name space and cache files maintained by the nsd daemon. Run with no arguments it acts as a command line interpreter and can be given multiple commands. Each command is followed by arguments and terminated by a newline. COMMANDS caches Lists all cache file names. cat map ... This cats the enumeration file for each named map. The list of maps can be found using the maps command. clean cache ... This remove entries that have timed out from a cache file. clear cache key ... This removes each of the named keys from the specified cache file. The list of cache files can be found using the caches command. domain domainname This sets the current domain for flush and clear commands. dump cache [key] ... This prints out some or all cached entries for the named map. If no keys are named then it prints out all entries for that map. The list of caches can be found by using the caches command. flush [cache] ... This removes all keys in each of the named cache files. If no cache files are named then it removes all keys from all cache files. The list of cache files can be found by using the caches command. grep map expression ... Does a regular expression search over the named map. Multiple perl(1) style regular expressions can be given and the lines which match any of the expressions will be printed. A list of maps can be found by using the maps command. help [command] ... Displays a help line for each of the named commands. If no commands are given then help will be given for all of the commands. maps This just lists the names of all the defined maps for this system. match map key ... This looks up one or more key in the named map. The list of maps can be found using the maps command. remove [cache] ... Invalidates and removes the named cache file. If no cache file is listed, all cache files will be removed. Cache files cannot safely be removed using rm since multiple running processes may be holding them open. Using this command the file can be safely removed and any running processes will reopen the file on next use. restart [options] ... Kills nsd and removes all cache files, and restarts nsd will the default options and any extras passed on the command line. watch Monitors the nsd process and restarts on failure. DIAGNOSTICS The nsadmin command returns with a 0 status from interactive mode, or if the command line execution succeeded. On failure, it will return a error status as defined in /usr/include/sys/errno.h. Some of these error codes are listed below. Other error codes may be returned directly from a system call. EINVAL The arguments passed to the command are invalid. ELIBACC The perl library MDBM_File could not be dynamically loaded. This library is available in the eoe.sw.gifts_perl_lib inst package. ENOENT The file requested to be operated on does not exist. EPERM The current process does not have permission to perform the requested command. FILES /var/ns/cache/* /ns/.local/* /etc/nsswitch.conf SEE ALSO nsd(1m) Page 2