🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by David Elliott Thu, 27 Oct 1988 14:24
Should "su -" set SHELL?
#886
Author: David Elliott
Date: Thu, 27 Oct 1988 14:24
25 lines
1351 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads