1nistest(1) User Commands nistest(1)
2
3
4
6 nistest - return the state of the NIS+ namespace using a conditional
7 expression
8
10 nistest [-ALMP] [-a rights | -t type] object
11
12
13 nistest [-ALMP] [-a rights] indexedname
14
15
16 nistest -c dir1 op dir2
17
18
20 nistest provides a way for shell scripts and other programs to test for
21 the existence, type, and access rights of objects and entries. Entries
22 are named using indexed names. See nismatch(1). With the -c option,
23 directory names can be compared to test where they lie in relation to
24 each other in the namespace.
25
27 The following options are supported:
28
29 -a rights This option is used to verify that the current process has
30 the desired or required access rights on the named object
31 or entries. The access rights are specified in the same
32 way as the nischmod(1) command.
33
34
35 -A All data. This option specifies that the data within the
36 table and all of the data in tables in the initial ta‐
37 ble's concatenation path be returned. This option is only
38 valid when using indexed names or following links.
39
40
41 -L Follow links. If the object named by object or the table‐
42 name component of indexedname names a LINK type object,
43 the link is followed when this switch is present.
44
45
46 -M Master server only. This option specifies that the lookup
47 should be sent to the master server of the named data.
48 This guarantees that the most up to date information is
49 seen at the possible expense that the master server may be
50 busy.
51
52
53 -P Follow concatenation path. This option specifies that the
54 lookup should follow the concatenation path of a table if
55 the initial search is unsuccessful. This option is only
56 valid when using indexed names or following links.
57
58
59 -t type This option tests the type of object. The value of type
60 can be one of the following:
61
62 D Return true if the object is a directory object.
63
64
65 G Return true if the object is a group object.
66
67
68 L Return true if the object is a link object.
69
70
71 P Return true if the object is a private object.
72
73
74 T Return true if the object is a table object.
75
76
77
78 -c Test whether or not two directory names have a certain
79 relationship to each other, for example, higher than (ht)
80 or lower than (lt). The complete list of values for op
81 can be displayed by using the -c option with no arguments.
82
83
85 Example 1 Using the nistest Command
86
87
88 When testing for access rights, nistest returns success (0) if the
89 specified rights are granted to the current user. Thus, testing for
90 access rights:
91
92
93 example% nistest -a w=mr skippy.domain
94
95
96
97
98 Tests that all authenticated NIS+ clients have read and modify access
99 to the object named skippy.domain.
100
101
102
103 Testing for access on a particular entry in a table can be accomplished
104 using the indexed name syntax. The following example tests to see if an
105 entry in the password table can be modified:
106
107
108 example% nistest -a o=m '[uid=99],passwd.org_dir'
109
110
111
112
113 To test if a directory lies higher in the namespace than another direc‐
114 tory, use the -c option with an op of ht (higher than) as in the fol‐
115 lowing example (which would return true):
116
117
118 example% nistest -c dom.com. ht lower.dom.com.
119
120
121
123 NIS_PATH If this variable is set, and the NIS+ name is not fully
124 qualified, each directory specified will be searched until
125 the object is found. See nisdefaults(1).
126
127
129 The following exit values are returned:
130
131 0 Successful operation.
132
133
134 1 Failure due to object not present, not of specified type, and/or
135 no such access.
136
137
138 2 Failure due to illegal usage.
139
140
142 See attributes(5) for descriptions of the following attributes:
143
144
145
146
147 ┌─────────────────────────────┬─────────────────────────────┐
148 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
149 ├─────────────────────────────┼─────────────────────────────┤
150 │Availability │SUNWnisu │
151 └─────────────────────────────┴─────────────────────────────┘
152
154 NIS+[22m(1), nischmod(1), nisdefaults(1), nismatch(1), attributes(5)
155
157 NIS+ might not be supported in future releases of the Solaris operating
158 system. Tools to aid the migration from NIS+ to LDAP are available in
159 the current Solaris release. For more information, visit
160 http://www.sun.com/directory/nisplus/transition.html.
161
162
163
164SunOS 5.11 2 Dec 2005 nistest(1)