Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

id(1) [ultrix man page]

id(1)							      General Commands Manual							     id(1)

Name
       id - print user and group ID and names

Syntax
       id [ -gnru ]

Description
       The  command  writes a message on the standard output giving the user and group ID and the corresponding names of the invoking process.	If
       the effective and real IDs do not match, both are printed.

       If multiple groups are supported by the underlying system, the supplementary group affiliations of the invoking process are also written.

       When no options are specified, the standard format of output produced by is uid=%d(%s) gid=%d(%s), <real user id>, <user-name>, <real group
       id>, <group-name>

Options
       -g     Outputs only the group ID. The default format is %d
.  This may be modified by the -n option. The default group ID is the effective
	      group ID; this may be modified by the -r option.

       -n     Outputs the name in the format %s
 instead of the numeric ID when the -u or -g options are used.

       -r     Outputs the real ID instead of the effective ID when the -u or -g options are used.  There is no option to produce a list of supple-
	      mentary group IDs alone.

       -u     Outputs  only  the user ID. The default output format is %d0fP.  This may be modified with the -n option. The default user ID is the
	      effective user ID; this may be modified by the -r option.

See Also
       logname(1), getuid(2)

																	     id(1)

Check Out this Related Man Page

id(1)							      General Commands Manual							     id(1)

NAME
id - print user and group IDs and names SYNOPSIS
[user] [user] [user] DESCRIPTION
The 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 process 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. If the selected user has more than one allowable group membership listed in the group database, then the group membership information is written. Options The following options modify the behavior described above. Display only the group ID. The default is the effective group ID; to modify, use the option. If the process has supplementary group affiliations that are different from the effective group ID (or the real ID if the option is used), display each such affiliation on the same line. The default is decimal format; to modify, use the option. Output all different group IDs (effective, real, and supplementary) only, using the format "%u ". If there is more than one distinct group affiliation, output each such affiliation, using the format " %u", before the <newline> is output. With A or display the ID name instead of the ID number. With or display the real ID instead of the effective ID. Display only the user ID. The default is the effective user ID; to modify, use the option. The default is decimal format; to modify, use the option. Displays process resource group ID for the process along with the user and group IDs and names. The option ignores user argument. See HP Process Resource Manager in RETURN VALUE
The error codes returned by are : Success. User not found or invalid options or invalid combination of options. The option is given when PRM is not supported or configured. EXAMPLES
To display the current user and group data: produces: To display the group ID number for the current process: produces: To display the group name for the current process: produces: To display the user and group data for another user: produces: To display the PRM group ID for the current process: produces: DEPENDENCIES
HP Process Resource Manager The 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. AUTHOR
was developed by HP and AT&T. SEE ALSO
groups(1), logname(1), getuid(2). HP Process Resource Manager: prmconfig(1), prmconf(4) in STANDARDS CONFORMANCE
id(1)
Man Page