Path: utzoo!attcan!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.unix.wizards Subject: Re: Real and effective userids. Message-ID: <1219@virtech.UUCP> Date: 2 Oct 89 03:34:35 GMT References: <288@bmers58.UUCP> <2204@hydra.gatech.EDU> Organization: Virtual Technologies Inc Lines: 26 In article <2204@hydra.gatech.EDU>, dvu@prism.gatech.EDU (Dinh Vu) writes: > In article <288@bmers58.UUCP>, davem@bmers58.UUCP (Dave Mielke) writes: > > Can anyone tell me what the "official" distinction is between the real > > userid and the effective userid of a process is? > > The real userid is the login id (the id from the passwd file), > and used for communication only. The effective userid is used > for accounting and other stuves... The real userid is not the login id. It is the numerical id of "the user" that is running a process, as opposed to "the effective" id of the process that is used to determine whether you can open, create, unlink, etc. a file. The only place where there is a difference between the real and effective user id's is when the user is running a setuid program that is owned by another user (or when that setuid program runs a sub-program). The reason for two id's is to allow the setuid programs to know who is executing them and to give them the chance to set thier user id back to the original id after some initial processing is done. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+