Previous | Table of Contents | Next |
DESCRIPTION
The id command displays your user ID, user name, group ID, and group name. Your user ID is the third field of the password file. The system uses this user ID to identify the files you own and other important information about processes you are executing. It converts (maps) your user ID to your user name and vice versa. The group ID works the same as the user ID except it is used for group level identification.
If the effective and real IDs are different, both are displayed. The effective IDs are what the shell environment presently considers your user ID and group ID. The real IDs are the user ID and group ID that you obtained when you originally logged in to the system.
COMMAND FORMAT
The general format for the id command is as follows .
id [ -a ]
Options
The following option may be used to control how the jobs command functions.
-a | Displays all the groups to which the invoking process belongs. If the real and effective id s are different, both are displayed. |
RELATED COMMANDS
Refer to the who command described in Module 159 and the logname command described in Module 78.
APPLICATION
The id command is used to display your user ID and group ID. The user name and group name are also displayed. The utility is useful for checking a user s ID and access privileges from a shell script that requires a certain level of security or logging information. It is also useful to check who has left themselves logged on at an unattended terminal.
TYPICAL OPERATION
In this activity you use the id command to display your user ID, group ID, user name, and group name.
cj> id uid=101(mylogin) gid=40(tech)
Previous | Table of Contents | Next |