Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Oct 1996 03:44:55 +0200 (MET DST)
From:      Robert Eckardt <roberte@mep.ruhr-uni-bochum.de>
To:        msmith@atrad.adelaide.edu.au (Michael Smith)
Cc:        roberte@mep.ruhr-uni-bochum.de, joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@FreeBSD.org, hasty@rah.star-gate.com
Subject:   Re: su problem
Message-ID:  <199610070144.DAA02647@ghost.mep.ruhr-uni-bochum.de>
In-Reply-To: <199610070112.KAA28805@genesis.atrad.adelaide.edu.au> from Michael Smith at "7. Oct. 96 10:40:08"

next in thread | previous in thread | raw e-mail | index | archive | help
> Robert Eckardt stands accused of saying:
[..]
> > >   su -l hasty -c "<something>"
> > 
> > It would be nice if this would work.
> > I was searching for that feature since the time I changed
> > from SysVr3.2 to FreeBSD. (And it's not in the manpage.)
> > 
> > Is the missing ability to execute commands like sh BSD-specific
> > or a security precaution ?
> 
> It's not missing.  We do a bunch of :

Ok, I cancel and declare the opposite. :-)

I tested this with every system/version and it worked everywhere
except on FreeBSD.
Q: Why ?
A: I use /bin/sh as login shell (for historical reasons :-) and call
   in .profile:
      [...]
      tcsh
      exit

   As long as sh is invoked as sh it works fine, however, if called
   as -sh it reads the profiles and does not execute the script.
   `su -l <user>' calls sh as login shell, i.e. as -sh.
   (The SysV-syntax allowed more freedom: I could call it as
    `su - user script'   == `su -l user script'
   or `su user script'   no equivalent in (Free|*?)BSD

BTW, other systems allow user USER-A to call `su [-l] USER-B script' w/o PW
if( USER-A == USER-B || USER-A == root).
(   ~~~~~~~~~~~~~~~~  Bug or feature ? :-)

Thanks,
Robert

-- 
Robert Eckardt                \\ FreeBSD -- solutions for a large universe.(tm)
RobertE@MEP.Ruhr-Uni-Bochum.de \\       What do you want to boot tomorrow ?(tm)
http://WWW.MEP.Ruhr-Uni-Bochum.de/~roberte
For PGP-key finger roberte@gluon.MEP.Ruhr-Uni-Bochum.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610070144.DAA02647>