*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> id (1)              
Title
Content
Arch
Section
 

Contents


 id(1)                                                                 id(1)




 NAME    [Toc]    [Back]
      id - print user and group IDs and names

 SYNOPSIS    [Toc]    [Back]
      id [-u] [-nr] [user]

      id [-g] [-nr] [user]

      id [-G] [-n] [user]

      id [-P]

 DESCRIPTION    [Toc]    [Back]
      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, 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    [Toc]    [Back]
      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 (or the real ID if the -r option is
                used), display each such affiliation on the same line.  The
                default is decimal format; to modify, use the -n option.

           -G   Output all different group IDs (effective, real, and
                supplementary) only, using the format "%u\n". If there is
                more than one distinct group affiliation, output each such
                affiliation, using the format "  %u", before the <newline>
                is output.

           -n   With A -u, -g, or -G, display the ID name instead of the ID
                number.

           -r   With -u, -g, 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.





 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 id(1)                                                                 id(1)




           -P   Displays process resource group ID for the process along
                with the user and group IDs and names.  The -P option
                ignores user argument.  See HP Process Resource Manager in
                DEPENDENCIES.

 RETURN VALUE    [Toc]    [Back]
      The error codes returned by id are :

           0    Success.
           1    User not found or invalid options or invalid combination of
                options.
           2    The -P option is given when PRM is not supported or
                configured.

 EXAMPLES    [Toc]    [Back]
      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 process:

           id -g

      produces:

           20

      To display the group name for the current process:

           id -gn

      produces:

           users

      To display the user and group data for another user:

           id ralford

      produces:

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

      To display the PRM group ID for the current process:

           id -P




 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003






 id(1)                                                                 id(1)




      produces:

           uid=329(ralford) gid=20(users) prmid=1(OTHERS)

 DEPENDENCIES    [Toc]    [Back]
    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.

 AUTHOR    [Toc]    [Back]
      id was developed by HP and AT&T.

 SEE ALSO    [Toc]    [Back]
      groups(1), logname(1), getuid(2).

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

 STANDARDS CONFORMANCE    [Toc]    [Back]
      id: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2


 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
pw_idtoname Tru64 Map between user and group names and IDs (Enhanced Security)
pw_nametoid Tru64 Map between user and group names and IDs (Enhanced Security)
pw_mapping Tru64 Map between user and group names and IDs (Enhanced Security)
gr_idtoname Tru64 Map between user and group names and IDs (Enhanced Security)
gr_nametoid Tru64 Map between user and group names and IDs (Enhanced Security)
users Linux print the user names of users currently logged in to the current host
id IRIX print the user name and ID, and group name and ID
from Linux print names of those who have sent mail
from OpenBSD print names of those who have sent mail
from FreeBSD print names of those who have sent mail
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service