1 .\" $NetBSD: id.1,v 1.11 2003/08/07 11:14:06 agc Exp $
3 .\" Copyright (c) 1991, 1993, 1994
4 .\" The Regents of the University of California. All rights reserved.
6 .\" This code is derived from software contributed to Berkeley by
7 .\" the Institute of Electrical and Electronics Engineers, Inc.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
17 .\" 3. Neither the name of the University nor the names of its contributors
18 .\" may be used to endorse or promote products derived from this software
19 .\" without specific prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .\" @(#)id.1 8.2 (Berkeley) 5/5/94
40 .Nd return user identity
59 utility displays the user and group names and numeric IDs, of the
60 calling process, to the standard output.
61 If the real and effective IDs are different, both are displayed,
62 otherwise only the real ID is displayed.
66 (login name or user ID)
67 is specified, the user and group IDs of that user are displayed.
68 In this case, the real and effective IDs are assumed to be the same.
70 The options are as follows:
73 Display the different group IDs (effective, real and supplementary)
74 as white-space separated numbers, in no particular order.
76 Display the effective group ID as a number.
78 Display the name of the user or group ID for the
83 options instead of the number.
84 If any of the ID numbers cannot be mapped into names, the number will be
87 Make the output human-readable.
88 If the user name returned by
90 is different from the login name referenced by the user ID, the name
93 is displayed, preceded by the keyword ``login''.
94 The user ID as a name is displayed, preceded by the keyword ``uid''.
95 If the effective user ID is different from the real user ID, the real user
96 ID is displayed as a name, preceded by the keyword ``euid''.
97 If the effective group ID is different from the real group ID, the real group
98 ID is displayed as a name, preceded by the keyword ``rgid''.
99 The list of groups to which the user belongs is then displayed as names,
100 preceded by the keyword ``groups''.
101 Each display is on a separate line.
103 Display the real ID for the
107 options instead of the effective ID.
109 Display the effective user ID as a number.
114 utility exits 0 on success, and \*[Gt]0 if an error occurs.
120 function is expected to conform to
126 command is equivalent to
127 .Dq Nm id Fl Gn Op Ar user .
132 command is equivalent to
137 command first appeared in