119 lines
3.2 KiB
HTML
119 lines
3.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content=
|
|
"text/html; charset=utf-8">
|
|
<title>id - Return user identity</title>
|
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</HEAD>
|
|
<body bgcolor="#FFFFFF">
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
|
|
|
|
<h2>id - Return user identity</h2>
|
|
|
|
<strong>Synopsis</strong>
|
|
|
|
<p><strong>id</strong> [<em>user</em>]</p>
|
|
|
|
<p><strong>id -G [-n]</strong> [<em>user</em>]</p>
|
|
|
|
<p><strong>id -g [-nr]</strong> [<em>user</em>]</p>
|
|
|
|
<p><strong>id -p</strong> [<em>user</em>]</p>
|
|
|
|
<p><strong>id -u [-nr]</strong> [<em>user</em>]</p>
|
|
|
|
<p><strong>Description</strong></p>
|
|
|
|
<p>The <strong>id</strong> utility displays the user and group
|
|
names and numeric identifiers, of the calling process, to standard
|
|
output. If the real and effective identifiers are different, both
|
|
are displayed, otherwise only the real identifier is displayed.</p>
|
|
|
|
<p>If a <em>user</em> (login name or user identifier) is specified,
|
|
the user and group identifiers of that user are displayed. In this
|
|
case, the real and effective identifiers are assumed to be the
|
|
same.</p>
|
|
|
|
<p><strong>Options</strong></p>
|
|
|
|
<dl>
|
|
<dt><strong>-G</strong></dt>
|
|
|
|
<dd>Display the different group identifiers (effective, real and
|
|
supplementary) as white-space separated numbers, in no particular
|
|
order.</dd>
|
|
|
|
<dt><strong>-g</strong></dt>
|
|
|
|
<dd>Display the effective group identifier as a number.</dd>
|
|
|
|
<dt><strong>-n</strong></dt>
|
|
|
|
<dd>Display the name of the user or group identifier for the
|
|
<strong>-G</strong>, <strong>-g</strong> and <strong>-u</strong>
|
|
options instead of the number. If any of the identifier numbers
|
|
cannot be mapped into names, the number will be displayed as
|
|
usual.</dd>
|
|
|
|
<dt><strong>-p</strong></dt>
|
|
|
|
<dd>Make the output human-readable. The user identifier as a name
|
|
is displayed, preceded by the keyword "uid". If the effective user
|
|
identifier is different from the real user identifier, the real
|
|
user identifier is displayed as a name, preceded by the keyword
|
|
"euid". If the effective group identifier is different from the
|
|
real group identifier, the real group identifier is displayed as a
|
|
name, preceded by the keyword "rgid". The list of groups to which
|
|
the user belongs is then displayed as names, preceded by the
|
|
keyword "groups". Each display is on a separate line.</dd>
|
|
|
|
<dt><strong>-r</strong></dt>
|
|
|
|
<dd>Display the real identifier for the <strong>-g</strong> and
|
|
<strong>-u</strong> options instead of the effective
|
|
identifier.</dd>
|
|
|
|
<dt><strong>-u</strong></dt>
|
|
|
|
<dd>Display the effective user identifier as a number.</dd>
|
|
</dl>
|
|
|
|
<p><strong>Exit Status</strong></p>
|
|
|
|
<ul>
|
|
<li>0 on success</li>
|
|
|
|
<li>>0 if an error occurs.</li>
|
|
</ul>
|
|
|
|
<p><strong>Related information</strong></p>
|
|
|
|
<ul>
|
|
<li><a href="logname.htm">logname - Return user's login
|
|
name</a></li>
|
|
</ul>
|
|
|
|
<strong>Examples</strong>
|
|
|
|
<ol>
|
|
<li>Display all user and groups identifiers that belong to the user
|
|
"SAM".
|
|
|
|
<pre>
|
|
id -p SAM
|
|
uid SAM
|
|
groups 500, 1
|
|
</pre>
|
|
</li>
|
|
</ol>
|
|
|
|
<!-- end ibmbody========================================================= -->
|
|
</body>
|
|
</html>
|
|
|