1 2:mod:`nis` --- Interface to Sun's NIS (Yellow Pages) 3==================================================== 4 5.. module:: nis 6 :platform: Unix 7 :synopsis: Interface to Sun's NIS (Yellow Pages) library. 8 :deprecated: 9 10.. moduleauthor:: Fred Gansevles <[email protected]> 11.. sectionauthor:: Moshe Zadka <[email protected]> 12 13.. deprecated-removed:: 3.11 3.13 14 The :mod:`nis` module is deprecated 15 (see :pep:`PEP 594 <594#nis>` for details). 16 17-------------- 18 19The :mod:`nis` module gives a thin wrapper around the NIS library, useful for 20central administration of several hosts. 21 22Because NIS exists only on Unix systems, this module is only available for Unix. 23 24.. include:: ../includes/wasm-notavail.rst 25 26The :mod:`nis` module defines the following functions: 27 28 29.. function:: match(key, mapname, domain=default_domain) 30 31 Return the match for *key* in map *mapname*, or raise an error 32 (:exc:`nis.error`) if there is none. Both should be strings, *key* is 8-bit 33 clean. Return value is an arbitrary array of bytes (may contain ``NULL`` and 34 other joys). 35 36 Note that *mapname* is first checked if it is an alias to another name. 37 38 The *domain* argument allows overriding the NIS domain used for the lookup. If 39 unspecified, lookup is in the default NIS domain. 40 41 42.. function:: cat(mapname, domain=default_domain) 43 44 Return a dictionary mapping *key* to *value* such that ``match(key, 45 mapname)==value``. Note that both keys and values of the dictionary are 46 arbitrary arrays of bytes. 47 48 Note that *mapname* is first checked if it is an alias to another name. 49 50 The *domain* argument allows overriding the NIS domain used for the lookup. If 51 unspecified, lookup is in the default NIS domain. 52 53 54.. function:: maps(domain=default_domain) 55 56 Return a list of all valid maps. 57 58 The *domain* argument allows overriding the NIS domain used for the lookup. If 59 unspecified, lookup is in the default NIS domain. 60 61 62.. function:: get_default_domain() 63 64 Return the system default NIS domain. 65 66 67The :mod:`nis` module defines the following exception: 68 69.. exception:: error 70 71 An error raised when a NIS function returns an error code. 72 73