Print this page
4023 - Typo in file(1) manpage and various others
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/id.1m
+++ new/usr/src/man/man1m/id.1m
1 1 '\" te
2 2 .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
3 3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 4 .\" http://www.opengroup.org/bookstore/.
5 5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
6 6 .\" This notice shall appear on any product containing this material.
7 7 .\" 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.
8 8 .\" 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.
9 9 .\" 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]
10 -.TH ID 1M "Nov 28, 2006"
10 +.TH ID 1M "Sep 10, 2013"
11 11 .SH NAME
12 12 id \- return user identity
13 13 .SH SYNOPSIS
14 14 .LP
15 15 .nf
16 16 \fB/usr/bin/id\fR [\fB-p\fR] [\fIuser\fR]
17 17 .fi
18 18
19 19 .LP
20 20 .nf
21 21 \fB/usr/bin/id\fR \fB-a\fR [\fB-p\fR] [\fIuser\fR]
22 22 .fi
23 23
24 24 .LP
25 25 .nf
26 26 \fB/usr/bin/id\fR \fB-G\fR [\fB-n\fR] [\fIuser\fR]
27 27 .fi
28 28
29 29 .LP
30 30 .nf
31 31 \fB/usr/bin/id\fR \fB-g\fR [\fB-nr\fR] [\fIuser\fR]
32 32 .fi
33 33
34 34 .LP
35 35 .nf
36 36 \fB/usr/bin/id\fR \fB-u\fR [\fB-nr\fR] [\fIuser\fR]
37 37 .fi
38 38
39 39 .LP
40 40 .nf
41 41 \fB/usr/xpg4/bin/id\fR [\fB-p\fR] [\fIuser\fR]
42 42 .fi
43 43
44 44 .LP
45 45 .nf
46 46 \fB/usr/xpg4/bin/id\fR \fB-a\fR [\fB-p\fR] [\fIuser\fR]
47 47 .fi
48 48
49 49 .LP
50 50 .nf
51 51 \fB/usr/xpg4/bin/id\fR \fB-G\fR [\fB-n\fR] [\fIuser\fR]
52 52 .fi
53 53
54 54 .LP
55 55 .nf
56 56 \fB/usr/xpg4/bin/id\fR \fB-g\fR [\fB-nr\fR] [\fIuser\fR]
57 57 .fi
58 58
59 59 .LP
60 60 .nf
61 61 \fB/usr/xpg4/bin/id\fR \fB-u\fR [\fB-nr\fR] [\fIuser\fR]
62 62 .fi
63 63
64 64 .SH DESCRIPTION
65 65 .sp
66 66 .LP
67 67 If no \fIuser\fR operand is provided, the \fBid\fR utility writes the user and
68 68 group \fBID\fRs and the corresponding user and group names of the invoking
69 69 process to standard output. If the effective and real \fBID\fRs do not match,
70 70 both are written. If multiple groups are supported by the underlying system,
71 71 \fB/usr/xpg4/bin/id\fR also writes the supplementary group affiliations of the
72 72 invoking process.
73 73 .sp
74 74 .LP
75 75 If a \fIuser\fR operand is provided and the process has the appropriate
76 76 privileges, the user and group \fBID\fRs of the selected user are written. In
77 77 this case, effective \fBID\fRs are assumed to be identical to real \fBID\fRs.
78 78 If the selected user has more than one allowable group membership listed in the
79 79 group database, \fB/usr/xpg4/bin/id\fR writes them in the same manner as the
80 80 supplementary groups described in the preceding paragraph.
81 81 .SS "Formats"
82 82 .sp
83 83 .LP
84 84 The following formats are used when the \fBLC_MESSAGES\fR locale category
85 85 specifies the "C" locale. In other locales, the strings \fBuid\fR, \fBgid\fR,
86 86 \fBeuid\fR, \fBegid\fR, and \fBgroups\fR may be replaced with more appropriate
87 87 strings corresponding to the locale.
88 88 .sp
89 89 .in +2
90 90 .nf
91 91 "uid=%u(%s) gid=%u(%s)\en" <\fIreal user ID\fR>, <\fIuser-name\fR>,
92 92 <\fIreal group ID\fR>, <\fIgroup-name\fR>
93 93 .fi
94 94 .in -2
95 95 .sp
96 96
97 97 .sp
98 98 .LP
99 99 If the effective and real user \fBID\fRs do not match, the following are
100 100 inserted immediately before the \fB\en\fR character in the previous format:
101 101 .sp
102 102 .in +2
103 103 .nf
104 104 " euid=%u(%s)"
105 105 .fi
106 106 .in -2
107 107 .sp
108 108
109 109 .sp
110 110 .LP
111 111 with the following arguments added at the end of the argument list:
112 112 .sp
113 113 .in +2
114 114 .nf
115 115 <\fIeffective user ID\fR>, <\fIeffective user-name\fR>
116 116 .fi
117 117 .in -2
118 118 .sp
119 119
120 120 .sp
121 121 .LP
122 122 If the effective and real group \fBID\fRs do not match, the following is
123 123 inserted directly before the \fB\en\fR character in the format string (and
124 124 after any addition resulting from the effective and real user \fBID\fRs not
125 125 matching):
126 126 .sp
127 127 .in +2
128 128 .nf
129 129 " egid=%u(%s)"
130 130 .fi
131 131 .in -2
132 132 .sp
133 133
134 134 .sp
135 135 .LP
136 136 with the following arguments added at the end of the argument list:
137 137 .sp
138 138 .in +2
139 139 .nf
140 140 <\fIeffectivegroup-ID\fR>, <\fIeffectivegroupname\fR>
141 141 .fi
142 142 .in -2
143 143 .sp
144 144
145 145 .sp
146 146 .LP
147 147 If the process has supplementary group affiliations or the selected user is
148 148 allowed to belong to multiple groups, the first is added directly before the
149 149 \fBNEWLINE\fR character in the format string:
150 150 .sp
151 151 .in +2
152 152 .nf
153 153 " groups=%u(%s)"
154 154 .fi
155 155 .in -2
156 156 .sp
157 157
158 158 .sp
159 159 .LP
160 160 with the following arguments added at the end of the argument list:
161 161 .sp
162 162 .in +2
163 163 .nf
164 164 <\fIsupplementary group ID\fR>, <\fIsupplementary group name\fR>
165 165 .fi
166 166 .in -2
167 167 .sp
168 168
169 169 .sp
170 170 .LP
171 171 and the necessary number of the following added after that for any remaining
172 172 supplementary group \fBID\fRs:
173 173 .sp
174 174 .in +2
175 175 .nf
176 176 ",%u(%s)"
177 177 .fi
178 178 .in -2
179 179 .sp
180 180
181 181 .sp
182 182 .LP
183 183 and the necessary number of the following arguments added at the end of the
184 184 argument list:
185 185 .sp
186 186 .in +2
187 187 .nf
188 188 <\fIsupplementary group ID\fR>, <\fIsupplementary group name\fR>
189 189 .fi
190 190 .in -2
191 191 .sp
192 192
193 193 .sp
194 194 .LP
195 195 If any of the user \fBID\fR, group \fBID\fR, effective user \fBID\fR, effective
196 196 group \fBID\fR or supplementary/multiple group \fBID\fRs cannot be mapped by
197 197 the system into printable user or group names, the corresponding (\fB%s\fR) and
198 198 name argument is omitted from the corresponding format string.
199 199 .sp
200 200 .LP
201 201 When any of the options are specified, the output format is as described under
202 202 OPTIONS.
203 203 .SH OPTIONS
204 204 .sp
205 205 .LP
206 206 The following options are supported by both \fB/usr/bin/id\fR and
207 207 \fB/usr/xpg4/bin/id\fR. The \fB-p\fR and \fB-a\fR options are invalid if
208 208 specified with any of the \fB-G\fR, \fB-g\fR, or \fB-u\fR options.
209 209 .sp
210 210 .ne 2
211 211 .na
212 212 \fB\fB-p\fR\fR
213 213 .ad
214 214 .RS 6n
↓ open down ↓ |
194 lines elided |
↑ open up ↑ |
215 215 Reports additionally the current project membership of the invoking process.
216 216 The project is reported using the format:
217 217 .sp
218 218 .in +2
219 219 .nf
220 220 "projid=%u(%s)"
221 221 .fi
222 222 .in -2
223 223 .sp
224 224
225 -which is inserted prior to the \fB\n\fR character of the default format
225 +which is inserted prior to the \fB\en\fR character of the default format
226 226 described in the \fBFormats\fR section. The arguments
227 227 .sp
228 228 .in +2
229 229 .nf
230 230 <\fIproject ID\fR>,<\fIproject name\fR>
231 231 .fi
232 232 .in -2
233 233 .sp
234 234
235 235 are appended to the end of the argument list. If the project \fBID\fR cannot
236 236 be mapped by the system into a printable project name, the corresponding
237 237 \fB(%s)\fR and name argument is omitted from the corresponding format string.
238 238 .RE
239 239
240 240 .sp
241 241 .ne 2
242 242 .na
243 243 \fB\fB-a\fR\fR
244 244 .ad
245 245 .RS 6n
246 246 Reports user name, user \fBID\fR and all the groups to which the user belongs.
247 247 .RE
248 248
249 249 .sp
250 250 .ne 2
251 251 .na
252 252 \fB\fB-G\fR\fR
253 253 .ad
254 254 .RS 6n
255 255 Outputs all different group \fBID\fRs (effective, real and supplementary) only,
256 256 using the format \fB"%u\en"\fR. If there is more than one distinct group
257 257 affiliation, output each such affiliation, using the format \fB" %u"\fR, before
258 258 the \fBNEWLINE\fR character is output.
259 259 .RE
260 260
261 261 .sp
262 262 .ne 2
263 263 .na
264 264 \fB\fB-g\fR\fR
265 265 .ad
266 266 .RS 6n
267 267 Outputs only the effective group \fBID\fR, using the format \fB"%u\en"\fR.
268 268 .RE
269 269
270 270 .sp
271 271 .ne 2
272 272 .na
273 273 \fB\fB-n\fR\fR
274 274 .ad
275 275 .RS 6n
276 276 Outputs the name in the format \fB"%s"\fR instead of the numeric \fBID\fR using
277 277 the format \fB"%u"\fR.
278 278 .RE
279 279
280 280 .sp
281 281 .ne 2
282 282 .na
283 283 \fB\fB-r\fR\fR
284 284 .ad
285 285 .RS 6n
286 286 Outputs the real \fBID\fR instead of the effective \fBID\fR.
287 287 .RE
288 288
289 289 .sp
290 290 .ne 2
291 291 .na
292 292 \fB\fB-u\fR\fR
293 293 .ad
294 294 .RS 6n
295 295 Outputs only the effective user \fBID\fR, using the format \fB"%u\en"\fR.
296 296 .RE
297 297
298 298 .SH OPERANDS
299 299 .sp
300 300 .LP
301 301 The following operand is supported:
302 302 .sp
303 303 .ne 2
304 304 .na
305 305 \fB\fIuser\fR\fR
306 306 .ad
307 307 .RS 8n
308 308 The user (login) name for which information is to be written.
309 309 .RE
310 310
311 311 .SH ENVIRONMENT VARIABLES
312 312 .sp
313 313 .LP
314 314 See \fBenviron\fR(5) for descriptions of the following environment variables
315 315 that affect the execution of \fBid\fR: \fBLANG\fR, \fBLC_ALL\fR,
316 316 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
317 317 .SH EXIT STATUS
318 318 .sp
319 319 .LP
320 320 The following exit values are returned:
321 321 .sp
322 322 .ne 2
323 323 .na
324 324 \fB\fB0\fR\fR
325 325 .ad
326 326 .RS 6n
327 327 Successful completion.
328 328 .RE
329 329
330 330 .sp
331 331 .ne 2
332 332 .na
333 333 \fB\fB>0\fR\fR
334 334 .ad
335 335 .RS 6n
336 336 An error occurred.
337 337 .RE
338 338
339 339 .SH ATTRIBUTES
340 340 .sp
341 341 .LP
342 342 See \fBattributes\fR(5) for descriptions of the following attributes:
343 343 .SS "/usr/bin/id"
344 344 .sp
345 345
346 346 .sp
347 347 .TS
348 348 box;
349 349 c | c
350 350 l | l .
351 351 ATTRIBUTE TYPE ATTRIBUTE VALUE
352 352 _
353 353 Interface Stability Stable
354 354 .TE
355 355
356 356 .SS "/usr/xpg4/bin/id"
357 357 .sp
358 358
359 359 .sp
360 360 .TS
361 361 box;
362 362 c | c
363 363 l | l .
364 364 ATTRIBUTE TYPE ATTRIBUTE VALUE
365 365 _
366 366 Interface Stability Standard
367 367 .TE
368 368
369 369 .SH SEE ALSO
370 370 .sp
371 371 .LP
372 372 \fBfold\fR(1), \fBlogname\fR(1), \fBwho\fR(1), \fBgetgid\fR(2),
373 373 \fBgetgroups\fR(2), \fBgetprojid\fR(2), \fBgetuid\fR(2), \fBattributes\fR(5),
374 374 \fBenviron\fR(5), \fBstandards\fR(5)
375 375 .SH NOTES
376 376 .sp
377 377 .LP
378 378 Output produced by the \fB-G\fR option and by the default case could
379 379 potentially produce very long lines on systems that support large numbers of
380 380 supplementary groups.
↓ open down ↓ |
145 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX