1nisldapmaptest(1M)      System Administration Commands      nisldapmaptest(1M)
2
3
4

NAME

6       nisldapmaptest - test NIS+ and LDAP mapping configuration files
7

SYNOPSIS

9       nisldapmaptest [-s | -r | -d] [-l | -t object] [-v] [-i]
10            [-o] [-m conffile] [-x attr=val...] [ col=val]...
11
12

DESCRIPTION

14       Use  the nisldapmaptest utility to test NIS+ to LDAP mapping configura‐
15       tion files. See NIS+LDAPmapping(4).  The  nisldapmaptest  utility  uses
16       much  of the same internal interface as the rpc.nisd(1M) does  to read,
17       add, modify, or delete LDAP data, as specified by the column  name  and
18       value  operand pairs. nisldapmaptest does not read or modify any of the
19       rpc.nisd(1M)  database files.
20
21
22       See  for  details  on  important  differences  between  the  ways  that
23       nisldapmaptest and rpc.nisd(1M) operate on LDAP data.
24

OPTIONS

26       The nisldapmaptest utility supports the following options:
27
28       -d                Delete data in LDAP.
29
30
31       -i                Ignore  failures  when obtaining information from the
32                         NIS+ server. This enables nisldapmaptest to  work  to
33                         some  extent, even if the NIS+ server is unreachable,
34                         or if the system is not a NIS+ client. However,  NIS+
35                         lookups  are  still   attempted, so there may be NIS+
36                         error messages.
37
38                         In this mode,  nisldapmaptest  also  tries  to  guess
39                         things  such  as  NIS+ object types and derives table
40                         column information from the mapping rules in the con‐
41                         figuration  files.  Avoid using the -i option to add,
42                         modify, or delete, until you have determined that the
43                         nisldapmaptest's guesses are adequate for your needs.
44
45
46       -l                Parse  the  configuration  file  into  internal  data
47                         structures, and then print out the configuration  per
48                         those  structures. Note that the printed data  is not
49                         in configuration file format.
50
51                         Either -l or  -t  must  be  specified.  If  both  are
52                         present, -l is ignored.
53
54
55       -m conffile       Specify the name of the NIS+LDAPmapping(4) configura‐
56                         tion file. The default directory is  /var/nis  ,  and
57                         the default mapping file is NIS+LDAPmapping.
58
59
60       -o                For  NIS+  tables,  work  on  the NIS+ object itself,
61                         specified by means of the -t option, not on the table
62                         entries.
63
64
65       -r                Replace or add data in LDAP.
66
67
68       -s                Search for data in LDAP. This is the default.
69
70
71       -t object         Specify  the  NIS+ object on which to operate. If the
72                         object name is not fully qualified, that is, it  does
73                         not end in a dot, the value of the nisplusLDAPbaseDo‐
74                         main attribute is appended.
75
76
77       -v                Set the verbose flag. This flag produces extra  diag‐
78                         nostic information.
79
80
81       -x attr=val...    Specify mapping attribute and value pairs to override
82                         those  obtained by means of the  configuration  file.
83                         Although  any   attributes  defined  on  NIS+LDAPmap‐
84                         ping(4) or rpc.nisd(4) can be  specified,   the  ones
85                         that control rpc.nisd(1M) operation have no effect on
86                         nisldapmaptest.
87
88

OPERANDS

90       The following operands are supported:
91
92       col=val...    NIS+ column and value pairs used to specify which entries
93                     should  be  looked  up,  added, modified, or deleted. For
94                     additions and modifications, use col=val to  specify  the
95                     new values.
96
97

EXAMPLES

99       Example 1 Searching for a User
100
101
102       Use the following example to search for the user xyzzy in the LDAP con‐
103       tainer  specified for the passwd.org_dir table.
104
105
106         example% nisldapmaptest -t passwd.org_dir name=xyzzy
107
108
109
110       Example 2 Listing Table Entries
111
112
113       Use the following example to list all entries in the  container  speci‐
114       fied for the services.org_dir table.
115
116
117         example% nisldapmaptest -t services.org_dir
118
119
120
121       Example 3 Listing an Object
122
123
124       Use  the  following example to list the services.org_dir object itself,
125       as it is stored in LDAP.
126
127
128         example% nisldapmaptest -o -t services.org_dir
129
130
131
132       Example 4 Modifying a Table Entry
133
134
135       Use the following example to modify the membership list  of  the  group
136       grp,  in  the  container  specified  for the group.org_dir table, to be
137       mem1, mem2, and mem3.
138
139
140         example% nisldapmaptest -r -t group.org_dir name=grp \
141              members=mem1,mem2,mem3
142
143
144
145       Example 5 Deleting a Table Entry
146
147
148       Use the following example to delete the host called bad from  the  con‐
149       tainer specified for the hosts.org_dir table.
150
151
152         example% nisldapmaptest -d -t hosts.org_dir name=bad
153
154
155

EXIT STATUS

157       The following exit values are returned:
158
159       0       The requested operation was successful.
160
161
162       != 0    An error occurred.
163
164

FILES

166       /var/nis/NIS+LDAPmapping.template
167
168
169
170
171       /etc/default/rpd.nisd
172
173
174
175

ATTRIBUTES

177       See attributes(5) for descriptions of the following attributes:
178
179
180
181
182       ┌─────────────────────────────┬─────────────────────────────┐
183       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
184       ├─────────────────────────────┼─────────────────────────────┤
185       │Availability                 │SUNWnisr                     │
186       ├─────────────────────────────┼─────────────────────────────┤
187       │Interface Stability          │Obsolete                     │
188       └─────────────────────────────┴─────────────────────────────┘
189

SEE ALSO

191       rpc.nisd(1M), NIS+LDAPmapping(4), rpc.nisd(4), attributes(5)
192

NOTES

194       There  are several differences between the ways that nisldapmaptest and
195       rpc.nisd operate:
196
197           1.     nisldapmaptest obtains information about NIS+  by  means  of
198                  the  NIS+  API  calls,  while rpc.nisd looks in its internal
199                  database.  Thus,  if  the  NIS+  server  is  not  available,
200                  nisldapmaptest  may be unable to determine NIS+ object types
201                  or table column information.
202
203           2.     While nisldapmaptest can add, modify, or delete  LDAP  data,
204                  it does not modify any NIS+ data.
205
206           3.     When operating on table entries, if nisldapmaptest is unable
207                  to obtain the entry from NIS+, it composes  LDAP  operations
208                  using  only the supplied col=val operands.  Depending on the
209                  mapping used, this can result in extra LDAP operations,  for
210                  example,  attempting  to  obtain  a  DN  for add, modify, or
211                  delete.
212
213           4.     The default value for nisplusLDAPbaseDomain is  the   system
214                  domain name per sysinfo(2) in nisldapmaptest, but the inter‐
215                  nal notion of the domain it serves in  rpc.nisd.  While  the
216                  two usually are the same, this is not necessarily always the
217                  case.
218
219           5.     When more than one NIS+ entry maps to a single  LDAP  entry,
220                  nisldapmaptest  may  be unable to perform a complete update,
221                  unless you make sure that the  col=val  specification  picks
222                  up  all  relevant NIS+ entries. For example, if you have the
223                  services.org_dir NIS+ entries:
224
225                    cname   name    proto   port
226
227                    x       x       tcp     12345
228                    x       y       tcp     12345
229                    x       z       tcp     12345
230
231                  then specifying cname=x will pick up all three  entries  and
232                  create  or modify the corresponding LDAP entry to have three
233                  CN values: x, y, and  z.  However,  specifying  name=x  will
234                  match  just  the  first NIS+ entry, and create or modify the
235                  LDAP entry to have just one CN: x.
236
237
238
239SunOS 5.11                        5 Dec 2001                nisldapmaptest(1M)
Impressum