From owner-freebsd-hackers Mon Oct 7 01:32:06 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA24223 for hackers-outgoing; Mon, 7 Oct 1996 01:32:06 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id BAA24190 for ; Mon, 7 Oct 1996 01:32:02 -0700 (PDT) Received: from gluon.mep.ruhr-uni-bochum.de (gluon.mep.ruhr-uni-bochum.de [134.147.160.165]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id BAA05908 for ; Mon, 7 Oct 1996 01:30:56 -0700 (PDT) Received: (from roberte@localhost) by gluon.mep.ruhr-uni-bochum.de (8.6.12/8.6.12) id KAA18221; Mon, 7 Oct 1996 10:23:06 +0200 From: Robert Eckardt Message-Id: <199610070823.KAA18221@gluon.mep.ruhr-uni-bochum.de> Subject: Re: su problem In-Reply-To: <199610070156.LAA29065@genesis.atrad.adelaide.edu.au> from Michael Smith at "7. Oct. 96 11:24:20" To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Mon, 7 Oct 1996 10:23:05 +0200 (MET DST) Cc: roberte@mep.ruhr-uni-bochum.de, msmith@atrad.adelaide.edu.au, 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 I last comment from me on that thread (I hope :-): su works like on any other system since 2.1.5. (The feature must have been introduced betweeen 2.1.0 and 2.1.5, and it *is* documented in the manpage -- somehow I got an old manpage at home.) 9:56 gluon: /u/roberte 0% uname -a FreeBSD gluon 2.1.0-RELEASE FreeBSD 2.1.0-RELEASE #0: Thu May 30 04:28:04 MET DST 1996 root@gluon:/usr/src/sys/compile/GLUON1 i386 9:56 gluon: /u/roberte 1% su roberte a_file_that_doesnt_exist Password: $ exit 9:57 gluon: /u/roberte 0% su roberte id Password: $ 9:53 beta: /home/roberte 2% uname -a FreeBSD beta 2.1.5-RELEASE FreeBSD 2.1.5-RELEASE #3: Fri Sep 27 01:58:05 MET DST 1996 roberte@ghost:/usr/home/re/src/sys.hp4020i/compile/BETA215HP_1 i386 9:53 beta: /home/roberte 2% su roberte a_file_that_doesnt_exist Password: a_file_that_doent_exist: Can't open a_file_that_doesnt_exist 9:53 beta: /home/roberte 0% su roberte -c id Password: uid=100(roberte) gid=100(agrgari) groups=100(agrgari), 0(wheel), 111(ids), 2468(reduce), 33(TeX), 2555(www) 9:55 beta: /home/roberte/tmp 0% su roberte ./dols Password: /homes/roberte/tmp BSDdcfclock.tar.gz dols dcf-clock1.3 i386 Of course, this uses the environment that is active when it is called (as opposed to -l). (However, in any case TERM should be set due to the bug that Amancio reported/fixed in this thread.) > > A: I use /bin/sh as login shell (for historical reasons :-) and call > > in .profile: > > [...] > > tcsh > > exit > > This is immeasurably bogus. Note that you are not passing any of the > arguments to sh on to tcsh. This doesn't matter. When called as login shell usually no arguments are given to the shell. And if there are they are only to be understood by sh not tcsh. (sh doesn't read the profiles when not called as login shell!) > If you want tcsh's features, use tcsh. If you want a login that uses > sh for scripting, create another user with the same uid and gid but > with a different name and shell. (we do this so that there is a I'm not sure if this doesn't break somewhere else when resolving id-->name. Thanks again for your comments, Robert -- Robert Eckardt ( Ruhr-Universitaet Bochum, Inst.f.Theor.Physik, NB6/169 ) Universitaetsstrasse 150, D-44780 Bochum, Germany ----X---8---- Telefon: +49 234 700-3709, Telefax: +49 234 7094-574 8 E-Mail: RobertE@MEP.Ruhr-Uni-Bochum.de --------8---- URL: http://WWW.MEP.Ruhr-Uni-Bochum.de/~roberte >>> To be successful one needs friends, <<< >>> To be very successful one needs enemies. <<<