Print this page
re #11781 rb3701 Update man related tools (add missed files)
re #11781 rb3701 Update man related tools
--HG--
rename : usr/src/cmd/man/src/THIRDPARTYLICENSE => usr/src/cmd/man/THIRDPARTYLICENSE
rename : usr/src/cmd/man/src/THIRDPARTYLICENSE.descrip => usr/src/cmd/man/THIRDPARTYLICENSE.descrip
rename : usr/src/cmd/man/src/man.c => usr/src/cmd/man/man.c
re #11201 nss: need local netgroup implementation
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/man/man1m/getent.1m
+++ new/usr/src/man/man1m/getent.1m
1 1 '\" te
2 2 .\" Copyright (c) 2014 Gary Mills
3 3 .\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved
4 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 7 .TH GETENT 1M "Mar 14, 2014"
8 8 .SH NAME
9 9 getent \- get entries from administrative database
10 10 .SH SYNOPSIS
11 11 .LP
12 12 .nf
13 13 \fBgetent\fR \fIdatabase\fR [\fIkey\fR]...
14 14 .fi
15 15
|
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 .SH DESCRIPTION
17 17 .sp
18 18 .LP
19 19 \fBgetent\fR gets a list of entries from the administrative database specified
20 20 by \fIdatabase\fR. The information generally comes from one or more of the
21 21 sources that are specified for the \fIdatabase\fR in \fB/etc/nsswitch.conf\fR.
22 22 .sp
23 23 .LP
24 24 \fIdatabase\fR is the name of the database to be examined. This can be
25 25 \fBpasswd\fR, \fBshadow\fR, \fBgroup\fR, \fBhosts\fR, \fBipnodes\fR, \fBservices\fR,
26 -\fBprotocols\fR, \fBethers\fR, \fBproject\fR, \fBnetworks\fR, or
27 -\fBnetmasks\fR. For each of these databases, \fBgetent\fR uses the appropriate
26 +\fBprotocols\fR, \fBethers\fR, \fBproject\fR, \fBnetworks\fR,
27 +\fBnetmasks\fR, or \fBnetgroup\fR.
28 +For each of these databases, \fBgetent\fR uses the appropriate
28 29 library routines described in \fBgetpwnam\fR(3C), \fBgetspnam\fR(3C), \fBgetgrnam\fR(3C),
29 30 \fBgethostbyaddr\fR(3NSL), \fBgethostbyname\fR(3NSL),
30 31 \fBgetipnodebyaddr\fR(3SOCKET), \fBgetipnodebyname\fR(3SOCKET),
31 32 \fBgetservbyname\fR(3SOCKET), \fBgetprotobyname\fR(3SOCKET),
32 -\fBethers\fR(3SOCKET), \fBgetprojbyname\fR(3PROJECT) and
33 -\fBgetnetbyname\fR(3SOCKET), respectively.
33 +\fBethers\fR(3SOCKET), \fBgetprojbyname\fR(3PROJECT),
34 +\fBgetnetbyname\fR(3SOCKET), or \fBgetnetgrent\fR(3C) respectively.
34 35 .sp
35 36 .LP
36 37 Each \fIkey\fR must be in a format appropriate for searching on the respective
37 38 database. For example, it can be a \fIusername\fR or \fInumeric-uid\fR for
38 39 \fBpasswd\fR; \fIhostname\fR or \fIIP\fR \fIaddress\fR for \fBhosts\fR; or
39 40 \fIservice\fR, \fIservice/protocol\fR, \fIport\fR, or \fIport/proto\fR for
40 41 \fBservices\fR.
41 42 .sp
42 43 .LP
43 44 \fBgetent\fR prints out the database entries that match each of the supplied
44 45 keys, one per line, in the format of the matching administrative file:
45 46 \fBpasswd\fR(4), \fBshadow\fR(4), \fBgroup\fR(4), \fBproject\fR(4), \fBhosts\fR(4),
46 47 \fBservices\fR(4), \fBprotocols\fR(4), \fBethers\fR(3SOCKET),
47 48 \fBnetworks\fR(4), or \fBnetmasks\fR(4). If no key is given, all entries
48 49 returned by the corresponding enumeration library routine, for example,
49 50 \fBgetpwent()\fR or \fBgethostent()\fR, are printed. Enumeration is not
50 51 supported on \fBipnodes\fR.
51 52 .SS "Key Interpretation for \fBpasswd\fR and \fBgroup\fR Databases"
52 53 .sp
53 54 .LP
54 55 When \fBgetent\fR is invoked with database set to \fBpasswd\fR, each key value
55 56 is processed as follows:
56 57 .RS +4
57 58 .TP
58 59 .ie t \(bu
59 60 .el o
60 61 If the key value consists only of numeric characters, \fBgetent\fR assumes that
61 62 the key value is a numeric user ID and searches the user database for a
62 63 matching user ID.
63 64 .RE
64 65 .RS +4
65 66 .TP
66 67 .ie t \(bu
67 68 .el o
68 69 If the user ID is not found in the user database or if the key value contains
69 70 any non-numeric characters, \fBgetent\fR assumes the key value is a user name
70 71 and searches the user database for a matching user name.
71 72 .RE
72 73 .sp
73 74 .LP
74 75 Similarly, when \fBgetent\fR is invoked with database set to \fBgroup\fR, each
75 76 key value is processed as follows:
76 77 .RS +4
77 78 .TP
78 79 .ie t \(bu
79 80 .el o
80 81 If the key value consists only of numeric characters, \fBgetent\fR assumes that
81 82 the key value is a numeric group ID and searches the group database for a
82 83 matching group ID.
83 84 .RE
84 85 .RS +4
85 86 .TP
86 87 .ie t \(bu
87 88 .el o
88 89 If the group ID is not found in the \fBgroup\fR database or if the key value
89 90 contains any non-numeric characters, \fBgetent\fR assumes the key value is a
90 91 group name and searches the \fBgroup\fR database for a matching group name.
91 92 .RE
92 93 .SH EXIT STATUS
93 94 .sp
94 95 .LP
95 96 The following exit values are returned:
96 97 .sp
97 98 .ne 2
98 99 .na
99 100 \fB\fB0\fR\fR
100 101 .ad
101 102 .RS 5n
102 103 Successful completion.
103 104 .RE
104 105
105 106 .sp
106 107 .ne 2
107 108 .na
108 109 \fB\fB1\fR\fR
109 110 .ad
110 111 .RS 5n
111 112 Command syntax was incorrect, an invalid option was used, or an internal error
112 113 occurred.
113 114 .RE
114 115
115 116 .sp
116 117 .ne 2
117 118 .na
118 119 \fB\fB2\fR\fR
119 120 .ad
120 121 .RS 5n
121 122 At least one of the specified entry names was not found in the database.
122 123 .RE
123 124
124 125 .sp
125 126 .ne 2
126 127 .na
127 128 \fB\fB3\fR\fR
128 129 .ad
129 130 .RS 5n
130 131 There is no support for enumeration on this database.
131 132 .RE
132 133
133 134 .SH FILES
134 135 .sp
135 136 .ne 2
136 137 .na
137 138 \fB\fB/etc/nsswitch.conf\fR\fR
138 139 .ad
139 140 .RS 22n
140 141 name service switch configuration file
141 142 .RE
142 143
143 144 .sp
144 145 .ne 2
145 146 .na
146 147 \fB\fB/etc/passwd\fR\fR
147 148 .ad
148 149 .RS 22n
149 150 password file
150 151 .RE
151 152
152 153 .sp
153 154 .ne 2
154 155 .na
155 156 \fB\fB/etc/shadow\fR\fR
156 157 .ad
157 158 .RS 22n
158 159 shadowed password file
159 160 .RE
160 161
161 162 .sp
162 163 .ne 2
163 164 .na
164 165 \fB\fB/etc/group\fR\fR
165 166 .ad
166 167 .RS 22n
167 168 group file
168 169 .RE
169 170
170 171 .sp
171 172 .ne 2
172 173 .na
173 174 \fB\fB/etc/inet/hosts\fR\fR
174 175 .ad
175 176 .RS 22n
176 177 IPv4 and IPv6 host name database
177 178 .RE
178 179
179 180 .sp
180 181 .ne 2
181 182 .na
182 183 \fB\fB/etc/services\fR\fR
183 184 .ad
184 185 .RS 22n
185 186 Internet services and aliases
186 187 .RE
187 188
188 189 .sp
189 190 .ne 2
190 191 .na
191 192 \fB\fB/etc/project\fR\fR
192 193 .ad
193 194 .RS 22n
194 195 project file
195 196 .RE
196 197
197 198 .sp
198 199 .ne 2
199 200 .na
200 201 \fB\fB/etc/protocols\fR\fR
201 202 .ad
202 203 .RS 22n
203 204 protocol name database
204 205 .RE
205 206
206 207 .sp
207 208 .ne 2
208 209 .na
209 210 \fB\fB/etc/ethers\fR\fR
210 211 .ad
211 212 .RS 22n
212 213 Ethernet address to hostname database or domain
213 214 .RE
214 215
215 216 .sp
216 217 .ne 2
217 218 .na
218 219 \fB\fB/etc/networks\fR\fR
219 220 .ad
220 221 .RS 22n
221 222 network name database
222 223 .RE
223 224
224 225 .sp
225 226 .ne 2
226 227 .na
227 228 \fB\fB/etc/netmasks\fR\fR
228 229 .ad
229 230 .RS 22n
230 231 network mask database
231 232 .RE
232 233
233 234 .SH SEE ALSO
234 235 .sp
235 236 .LP
236 237 \fBethers\fR(3SOCKET), \fBgetgrnam\fR(3C), \fBgethostbyaddr\fR(3NSL),
237 238 \fBgethostbyname\fR(3NSL), \fBgethostent\fR(3NSL),
238 239 \fBgetipnodebyaddr\fR(3SOCKET), \fBgetipnodebyname\fR(3SOCKET),
239 240 \fBgetnetbyname\fR(3SOCKET), \fBgetprojbyname\fR(3PROJECT),
240 241 \fBgetprotobyname\fR(3SOCKET), \fBgetpwnam\fR(3C),
241 242 \fBgetservbyname\fR(3SOCKET), \fBgroup\fR(4), \fBhosts\fR(4),
242 243 \fBnetmasks\fR(4), \fBnetworks\fR(4), \fBnsswitch.conf\fR(4), \fBpasswd\fR(4),
243 244 \fBproject\fR(4), \fBprotocols\fR(4), \fBservices\fR(4), \fBattributes\fR(5)
|
↓ open down ↓ |
200 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX