Martin, That is certainly my understanding. Peter. On Mon, 2003-07-28 at 11:30, Martin Orr wrote:
On Mon, Jul 28, 2003 at 10:33:34AM +0100, Thomas Adam wrote:
--- Peter Wilson <peter.wilson@tuxite.com> wrote:
As far as my understanding of the philosophy of su is concerned, the default action is not to perform a 'login' but to change the effective guid and uid of the shell, this is the function of the '-' or '-l'
Yes, you are right when you say that a normal "su" changes the effective UID **and** GID, but that is only for the $USER, and NOT for the shell as you write above :) the shell does not have U{G}ID's!!!
Of course the shell has UID and GIDs. The shell is a process and every process has real, effective, saved and (on Linux) filesystem UIDs and GIDs which determine which files it can access and how it can interact with other processes. It makes no difference how you call su however - they will all be set to 0. (If you want to see these values, "cat /proc/$PID/status | grep Uid" will give them to you.)
-- Martin Orr Linux Administrator, Methodist College Belfast