From owner-freebsd-hackers Sun Oct 6 18:45:33 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA25158 for hackers-outgoing; Sun, 6 Oct 1996 18:45:33 -0700 (PDT) Received: from ghost.mep.ruhr-uni-bochum.de (ghost.mep.ruhr-uni-bochum.de [134.147.6.16]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA25151 for ; Sun, 6 Oct 1996 18:45:30 -0700 (PDT) Received: (from roberte@localhost) by ghost.mep.ruhr-uni-bochum.de (8.7.5/8.7.3) id DAA02647; Mon, 7 Oct 1996 03:44:56 +0200 (MET DST) From: Robert Eckardt Message-Id: <199610070144.DAA02647@ghost.mep.ruhr-uni-bochum.de> Subject: Re: su problem In-Reply-To: <199610070112.KAA28805@genesis.atrad.adelaide.edu.au> from Michael Smith at "7. Oct. 96 10:40:08" To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Mon, 7 Oct 1996 03:44:55 +0200 (MET DST) Cc: roberte@mep.ruhr-uni-bochum.de, joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@FreeBSD.org, hasty@rah.star-gate.com X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > Robert Eckardt stands accused of saying: [..] > > > su -l hasty -c "" > > > > 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 ' 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