1nismatch(1)                      User Commands                     nismatch(1)
2
3
4

NAME

6       nismatch, nisgrep - utilities for searching NIS+ tables
7

SYNOPSIS

9       nismatch [-AchMoPv] [-s sep] key tablename
10
11
12       nismatch [-AchMoPv] [-s sep] colname = key... tablename
13
14
15       nismatch [-AchMoPv] [-s sep] indexedname
16
17
18       nisgrep [-AchiMov] [-s sep] keypat tablename
19
20
21       nisgrep [-AchiMov] [-s sep] colname = keypat... tablename
22
23

DESCRIPTION

25       The  utilities  nismatch and nisgrep can be used to search NIS+ tables.
26       The command  nisgrep differs from the nismatch command in  its  ability
27       to  accept  regular  expressions  keypat for the search criteria rather
28       than simple text matches.
29
30
31       Because nisgrep uses a callback function,  it  is  not  constrained  to
32       searching  only  those columns that are specifically made searchable at
33       the time of table creation. This makes it more  flexible,  but  slower,
34       than nismatch.
35
36
37       In  nismatch,  the  server  does  the searching, whereas in nisgrep the
38       server returns all the readable entries and then the  client  does  the
39       pattern-matching.
40
41
42       In  both commands, the parameter  tablename is the NIS+ name of the ta‐
43       ble to be searched. If only one key or key pattern is specified without
44       the  column  name,  then it is applied searching the first column. Spe‐
45       cific named columns can be searched by using  the  colname=key  syntax.
46       When multiple columns are searched, only entries that match in all col‐
47       umns are returned. This is the equivalent of a logical join operation.
48
49
50       nismatch accepts an additional form of  search  criteria,  indexedname,
51       which is a NIS+ indexed name of the form:
52
53
54       [ colname=value, ... ],tablename
55

OPTIONS

57       The following options are supported:
58
59       -A        All  data.  Return  the  data within the table and all of the
60                 data in tables in the initial table's concatenation path.
61
62
63       -c        Print only a count of the number of entries that matched  the
64                 search criteria.
65
66
67       -h        Display  a  header line before the matching entries that con‐
68                 tains the names of the table's columns
69
70
71       -i        Ignore upper/lower case distinction during comparisons.
72
73
74       -M        Master server only. Send the lookup to the master  server  of
75                 the  named  data.  This  guarantees  that the most up to date
76                 information is seen at the possible expense that  the  master
77                 server may be busy.
78
79
80       -o        Display  the  internal  representation  of  the matching NIS+
81                 object(s).
82
83
84       -P        Follow concatenation path. Specify  that  the  lookup  should
85                 follow  the  concatenation  path  of  a  table if the initial
86                 search is unsuccessful.
87
88
89       -s sep    This option specifies the character to use  to  separate  the
90                 table columns. If no character is specified, the default sep‐
91                 arator for the table is used.
92
93
94       -v        Verbose. Do not suppress the output of binary data when  dis‐
95                 playing  matching entries. Without this option binary data is
96                 displayed as the string  *BINARY*.
97
98

EXAMPLES

100       Example 1 Searching a table for a username
101
102
103       This example searches a table named  passwd in the   org_dir  subdirec‐
104       tory  of the  zotz.com. domain. It returns the entry that has the user‐
105       name of skippy. In this example, all the work is done on the server:
106
107
108         example% nismatch name=skippy passwd.org_dir.zotz.com.
109
110
111
112       Example 2 Finding users using specific shells
113
114
115       This example is similar to the one above, except that it uses   nisgrep
116       to  find  all  users  in  the table named  passwd that are using either
117       ksh(1) or csh(1):
118
119
120         example% nisgrep 'shell=[ck]sh' passwd.org_dir.zotz.com.
121
122
123

ENVIRONMENT VARIABLES

125       NIS_PATH    If this variable is set, and the NIS+  table  name  is  not
126                   fully  qualified, each directory specified will be searched
127                   until the table is found (see nisdefaults(1)).
128
129

EXIT STATUS

131       The following exit values are returned:
132
133       0    Successfully matches some entries.
134
135
136       1    Successfully searches the table and no matches are found.
137
138
139       2    An error condition occurs. An error message is also printed.
140
141

ATTRIBUTES

143       See attributes(5) for descriptions of the following attributes:
144
145
146
147
148       ┌─────────────────────────────┬─────────────────────────────┐
149       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
150       ├─────────────────────────────┼─────────────────────────────┤
151       │Availability                 │SUNWnisu                     │
152       └─────────────────────────────┴─────────────────────────────┘
153

SEE ALSO

155       niscat(1), nisdefaults(1), nisls(1),  nistbladm(1),  nis_objects(3NSL),
156       attributes(5)
157

DIAGNOSTICS

159       No memory
160
161           An attempt to allocate some memory for the search failed.
162
163
164       tablename is not a table
165
166           The object with the name tablename was not a table object.
167
168
169       Can't compile regular expression
170
171           The regular expression in keypat was malformed.
172
173
174       column not found: colname
175
176           The  column named colname does not exist in the table named  table‐
177           name.
178
179

NOTES

181       NIS+ might not be supported in future releases of the Solaris operating
182       system.  Tools  to aid the migration from NIS+ to LDAP are available in
183       the   current   Solaris   release.   For   more   information,    visit
184       http://www.sun.com/directory/nisplus/transition.html.
185
186
187
188SunOS 5.11                        2 Dec 2005                       nismatch(1)
Impressum