User identifier

From Wikipedia, the free encyclopedia

Jump to: navigation, search

Unix-like operating systems identify users within the kernel by an unsigned integer value called a user identifier, often abbreviated to UID or User ID. The range of UID values varies amongst different systems; at the very least, a UID represents a 15-bit integer, ranging between 0 and 32767, with the following restrictions:

  • The superuser must always have a UID of zero (0).
  • The user “nobody” traditionally got the largest possible UID (as the opposite of the Superuser): 32767. More recently, systems have assigned the user a UID in the system range (1–100, see below) or in the range 65530–65535.
  • Convention reserves UIDs from 1 to 100 for system use; some manuals recommend reserving UIDs from 101 up to 499 (Red Hat Enterprise Linux) or even up to 999 (Debian) as well.

The UID value references users in the /etc/passwd file. Shadow password files and Network Information Service also refer to numeric UIDs. The user identifier has become a necessary component of Unix file systems and processes. Some operating systems support 16-bit UIDs, making 65536 unique IDs possible; a modern system with 32-bit UIDs will potentially make 4,294,967,296 (232) distinct values available.

In POSIX-compliant environments the commandline command id gives the users user identifier number as well as more information on the user account like the user name, primary user group and group identifier (GID).

[edit] See also