dce@mips.COM (David Elliott) (10/27/88)
In SVR3 (and SVR3.1), if you run su with the - option, it clears out the environment and executes the shell (found in the password file) of the new user, but, unlike login, and unlike you might expect, does not set the environment variable SHELL to this value. This means that programs that use the value of SHELL to execute subshells use /bin/sh, no matter what shell is being used interactively. When I first heard of this problem, I changed su to set SHELL just as login would. The problem is that this broke sysadm. The admin login shell (via /usr/admin/.profile) looks to see if SHELL is set to /bin/rsh to tell it if the process was invoked via su or login, and uses this information to figure out how it should get any arguments. So, now we're back to where we started; su - doesn't work like login, and could be considered to be broken. Anyone have any opinion on this? -- David Elliott dce@mips.com or {ames,prls,pyramid,decwrl}!mips!dce