Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ id(1) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

groups(1)

logname(1)

getuid(2)

prmconfig(1)

prmconf(4)

id(1)

NAME

id − print user and group IDs and names

SYNOPSIS

id [-g|-u] [-nr] [-P] [user]

DESCRIPTION

The id command writes a message to standard output, giving the user and group IDs and names for the process.  If the effective and real IDs are different, both are printed. 

If the process has supplementary group affiliations (see groups(1)), the supplementary group affiliations are also written.

If the user operand is specified, and the user has appropriate privileges, the user and group IDs of the selected user are written.  In this case, effective IDs are assumed to be identical to real IDs. 

Options

The following options modify the behavior described above. 

-g Display only the group ID.  The default is the effective group ID; to modify, use the -r option.  If the process has supplementary group affiliations that are different from the effective group ID, display each such affiliation on the same line.  The default is decimal format; to modify, use the -n option. 

-n With -u or -g, display the name in character string format instead of the numeric ID. 

-r With -u or -g, display the real ID instead of the effective ID. 

-u Display only the user ID.  The default is the effective user ID; to modify, use the -r option.  The default is decimal format; to modify, use the -n option. 

-P Display the process resource group ID.  See HP Process Resource Manager in DEPENDENCIES. 

EXAMPLES

To display the current user and group data:

id

produces:

uid=1834(allanp) gid=20(users)

To display the group ID number for the current user:

id -g

produces:

20

To display the group name for the current user:

id -gn

produces:

users

To display the user and group data for another user:

id ralford

produces:

uid=329(ralford) gid=20(users)

if the user has appropriate privileges.  Otherwise, it produces the data for the user. 

AUTHOR

id was developed by HP and AT&T. 

DEPENDENCIES

HP Process Resource Manager

The -P option requires that the optional HP Process Resource Manager (PRM) software be installed and configured.  See prmconfig(1) for a description of how to configure HP PRM, and prmconf(4) for the definition of the process resource group.

SEE ALSO

groups(1), logname(1), getuid(2). 

HP Process Resource Manager: prmconfig(1), prmconf(4) in HP Process Resource Manager User’s Guide.

STANDARDS CONFORMANCE

id: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026