nismatch, nisgrep - utilities for searching NIS+ tables
nismatch [-AchMoPv] [-s sep] key tablename
nismatch [-AchMoPv] [-s sep] colname = key... tablename
nismatch [-AchMoPv] [-s sep] indexedname
nisgrep [-AchiMov] [-s sep] keypat tablename
nisgrep [-AchiMov] [-s sep] colname = keypat... tablename
The utilities nismatch and nisgrep can be used to search NIS+ tables. The command nisgrep differs from the nismatch command in its ability to accept regular expressions keypat for the search criteria rather than simple text matches.
Because nisgrep uses a callback function, it is not constrained to searching only those columns that are specifically made searchable at the time of table creation. This makes it more flexible, but slower, than nismatch.
In nismatch, the server does the searching, whereas in nisgrep the server returns all the readable entries and then the client does the pattern-matching.
In both commands, the parameter tablename is the NIS+ name of the table to be searched. If only one key or key pattern is specified without the column name, then it is applied searching the first column. Specific named columns can be searched by using the colname=key syntax. When multiple columns are searched, only entries that match in all columns are returned. This is the equivalent of a logical join operation.
nismatch accepts an additional form of search criteria, indexedname, which is a NIS+ indexed name of the form:
[ colname=value, ... ],tablename
The following options are supported:
-A
-c
-h
-i
-M
-o
-P
-s sep
-v
Example 1 Searching a table for a username
This example searches a table named passwd in the org_dir subdirectory of the zotz.com. domain. It returns the entry that has the username of skippy. In this example, all the work is done on the server:
example% nismatch name=skippy passwd.org_dir.zotz.com.
Example 2 Finding users using specific shells
This example is similar to the one above, except that it uses nisgrep to find all users in the table named passwd that are using either ksh(1) or csh(1):
example% nisgrep 'shell=[ck]sh' passwd.org_dir.zotz.com.
NIS_PATH
The following exit values are returned:
0
1
2
See attributes(5) for descriptions of the following attributes:
|
niscat(1), nisdefaults(1), nisls(1), nistbladm(1), nis_objects(3NSL), attributes(5)
No memory
tablename is not a table
Can't compile regular expression
column not found: colname
NIS+ might not be supported in future releases of the Solaris operating system. Tools to aid the migration from NIS+ to LDAP are available in the current Solaris release. For more information, visit http://www.sun.com/directory/nisplus/transition.html.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |