-.\" $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.18 2006/09/26 22:28:12 ceri Exp $
.\"
-.Dd May 5, 1994
+.Dd September 26, 2006
.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 A
+.Nm
.Fl G Op Fl n
.Op Ar user
-.Nm ""
+.Nm
+.Fl M
+.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 A
+Display the process audit user ID and other process audit properties, which
+requires privilege.
.It Fl G
Display the different group IDs (effective, real and supplementary)
as white-space separated numbers, in no particular order.
+.It Fl M
+Display the MAC label of the current process.
+.It Fl P
+Display the id as a password file entry.
+.It Fl a
+Ignored for compatibility with other
+.Nm
+implementations.
.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 EXIT STATUS
+.Ex -std
.Sh SEE ALSO
.Xr who 1
.Sh STANDARDS
.Pp
The
.Nm
-command first appeared in
+command appeared in
.Bx 4.4 .