Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/i/id.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/i/id.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/i/id.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/i/id.html on line 8
Return user and group IDs (POSIX)
id [username]
id -G [-n] [username]
id -g [-nr] [username]
id -u [-nr] [username]
Neutrino
- -G
- Write the real (and effective, if different) group ID only.
- -g
- Write the effective group ID only.
- -u
- Write the effective user ID only.
- -n
- In combination with -G, -g, or
-u, write the ID as its name instead of as an
unsigned integer.
- -r
- In combination with -g or -u,
write the real ID instead of the effective ID.
The id utility writes the current real and/or effective
user ID and group ID.
When no options are specified, output is as follows:
uid=nnn(username) gid=nnn(groupname)
If the effective user ID is different from the real user ID,
the effective user ID also appears:
... euid=nnn(effective_username)
Likewise, if the effective group ID is different from the real
group ID, the effective group ID appears as well:
... egid=nnn(effective_groupname)
If no entry exists for an ID in the /etc/passwd
or /etc/group files, the output lacks the
(name) after the
numerical value. No error is generated.
If a username is supplied as an operand, the
effective uid and gid don't
appear since there's no process associated with it — the information is simply
looked up in the /etc/passwd and
/etc/group files.
When options are specified, the requested data is written as an unsigned
integer, unless option -n is specified, in which case the
data is written as the corresponding user or group name. With option
-G, the id utility might produce two lines of
output (one value per line) if the real and effective IDs differ.
In all other cases, id always produces one line of output.
Write information on current IDs (real and effective):
$ id
uid=109(eric) gid=120(techies)
Write the effective group ID as a number:
$ id -g
120
Write the effective group ID as a name:
$ id -gn
techies
- /etc/passwd
- Password file; defines user IDs, home directories, etc.
- /etc/group
- Group file; defines the valid group IDs for the system, also
lists user IDs who may change to each group.
- 0
- Successful completion.
- >0
- An error occurred.
who
Logging In, Logging Out, and Shutting Down
in the Neutrino User's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/i/id.html on line 191
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/i/id.html on line 191