user identifier
≈ 3 min read
Names in other languages
- РусскийИдентификатор пользователя
- DeutschBenutzerkennung
- Englishuser identifier
- FrançaisUser identifier
- Portuguêsuser identifier
- 日本語ユーザー識別子
- 中文用户ID
- PolskiUID
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
In Unix-like operating systems, a user identifier (often abbreviated to user ID or UID) is a value used to identify a user. The UID, along with the group identifier (GID) and other access control criteria, is used to determine which system resources a user can access. The password file maps textual user names to UIDs. UIDs are stored in the inodes of the Unix file system, running processes, tar archives, and the now-obsolete Network Information Service. In POSIX-compliant environments, the shell command id gives the current user's UID, as well as more information such as the user name and the primary and supplementary group identifiers (GIDs) and group names.
In Unix-like operating systems, a user identifier (often abbreviated to user ID or UID) is a value used to identify a user. The UID, along with the group identifier (GID) and other access control criteria, is used to determine which system resources a user can access. The password file maps textual user names to UIDs. UIDs are stored in the inodes of the Unix file system, running processes, tar archives, and the now-obsolete Network Information Service. In POSIX-compliant environments, the shell command id gives the current user's UID, as well as more information such as the user name and the primary and supplementary group identifiers (GIDs) and group names.
Effective user ID
The effective UID ( euid ) of a process is used for most access checks. It is also used as the owner for files created by that process.
Real user ID
The real UID ( ruid ) and real GID ( rgid ) identify the real owner of the process and affect the permissions for sending signals. A process without superuser privileges may signal another process only if the sender's ruid or euid matches receiver's ruid or suid . Because a child process inherits its credentials from its parent, a child and parent may signal each other.
Saved user ID
The saved user ID is used when a program running with elevated privileges needs to do some unprivileged work temporarily; changing euid from a privileged value (usually 0 ) to some unprivileged value (anything other than the privileged value) causes the privileged value to be stored in suid . Later, a program's euid can be set back to the value stored in suid , so that elevated privileges can be restored; an unprivileged process may set its euid to one of only three values: the value of ruid , the value of suid , or the value of euid . Nobody: Historically, the user "nobody" was assigned UID -2 by several operating systems, although other values such as 2 15 −1 = 32,767 are also in use, such as by OpenBSD. For compatibility between 16-bit and 32-bit UIDs, many Linux distributions now set it to be 2 16 −2 = 65,534; the Linux kernel defaults to returning this value when a 32-bit UID does not fit into the return value of the 16-bit system calls. Fedora Linux assigns the last UID of the range statically allocated for system use (0–99) to nobody: 99, and calls 65534 instead nfsnobody .
See also
FAT access rights File-system permissions Open (system call) Process identifier Security Identifier (SID) – the Windows NT equivalent setuid Sticky bit
Notes
References
Text derived from https://en.wikipedia.org/w/index.php?oldid=1377015704 under CC BY-SA 4.0; modifications have been made.