-.\" $NetBSD: id.1,v 1.7 1997/10/19 02:45:47 lukem Exp $
-.\"
-.\" Copyright (c) 1991, 1993, 1994
+.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)id.1 8.2 (Berkeley) 5/5/94
+.\" @(#)id.1 8.1 (Berkeley) 6/6/93
+.\" $FreeBSD: src/usr.bin/id/id.1,v 1.11 2001/08/15 09:09:41 ru Exp $
.\"
-.Dd May 5, 1994
+.Dd June 6, 1993
.Dt ID 1
-.Os BSD 4.4
+.Os
.Sh NAME
.Nm id
.Nd return user identity
.Sh SYNOPSIS
.Nm
.Op Ar user
-.Nm ""
+.Nm
.Fl G Op Fl n
.Op Ar user
-.Nm ""
+.Nm
+.Fl P
+.Op Ar user
+.Nm
.Fl g Op Fl nr
.Op Ar user
-.Nm ""
+.Nm
.Fl p
-.Nm ""
+.Op Ar user
+.Nm
.Fl u Op Fl nr
.Op Ar user
.Sh DESCRIPTION
In this case, the real and effective IDs are assumed to be the same.
.Pp
The options are as follows:
-.Bl -tag -width Ds
+.Bl -tag -width indent
.It Fl G
Display the different group IDs (effective, real and supplementary)
as white-space separated numbers, in no particular order.
+.It Fl P
+Display the id as a password file entry.
.It Fl g
Display the effective group ID as a number.
.It Fl n
is different from the login name referenced by the user ID, the name
returned by
.Xr getlogin 2
-is displayed, preceded by the keyword ``login''.
-The user ID as a name is displayed, preceded by the keyword ``uid''.
+is displayed, preceded by the keyword
+.Dq login .
+The user ID as a name is displayed, preceded by the keyword
+.Dq uid .
If the effective user ID is different from the real user ID, the real user
-ID is displayed as a name, preceded by the keyword ``euid''.
+ID is displayed as a name, preceded by the keyword
+.Dq euid .
If the effective group ID is different from the real group ID, the real group
-ID is displayed as a name, preceded by the keyword ``rgid''.
+ID is displayed as a name, preceded by the keyword
+.Dq rgid .
The list of groups to which the user belongs is then displayed as names,
-preceded by the keyword ``groups''.
+preceded by the keyword
+.Dq groups .
Each display is on a separate line.
.It Fl r
Display the real ID for the
.It Fl u
Display the effective user ID as a number.
.El
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh DIAGNOSTICS
+.Ex -std
.Sh SEE ALSO
.Xr who 1
.Sh STANDARDS
.Pp
The
.Nm
-command first appeared in
+command appeared in
.Bx 4.4 .