id(1M) id(1M)
id - print the user name and ID, and group name and ID
id [-aM]
id -G [-n] [user]
id -g [-nr] [user]
id -u [-nr] [user]
id displays the calling process's ID and name. It also displays the
group ID and name. If the real and effective IDs do not match, both are
printed.
user The login name for which the information is to be reported.
-a Report all the groups to which the invoking process belongs.
-g Reports only the effective group ID, using the format "%u\n".
-G Reports all different group IDs (effective, real and supplementary),
using the format "%u\n". If there is more than one distinct group
affiliation, output each such affiliation, using the format "%u\n",
before the newline character is output.
-M If mandatory access control (MAC) is enabled the -M option reports
the MAC label at which the invoking process is running. If MAC is
not enabled the option is ignored.
-P Reports the capability set of the invoking process.
-n Reports the name in the format "%s" instead of the numeric ID using
the format "%u".
-r Reports the real ID instead of the effective ID.
-u Reports the effective user ID, using the format "%u\n".
/etc/passwd system password file
/etc/group system group file
/etc/mac MAC label definition file
logname(1), multgrps(1), newgrp(1), getgroups(2), getuid(2),
setgroups(2), initgroups(3C).
PPPPaaaaggggeeee 1111 [ Back ]
|