Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Oct 1996 10:23:05 +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, msmith@atrad.adelaide.edu.au, joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@FreeBSD.org, hasty@rah.star-gate.com
Subject:   Re: su problem
Message-ID:  <199610070823.KAA18221@gluon.mep.ruhr-uni-bochum.de>
In-Reply-To: <199610070156.LAA29065@genesis.atrad.adelaide.edu.au> from Michael Smith at "7. Oct. 96 11:24:20"

next in thread | previous in thread | raw e-mail | index | archive | help
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.                             <<<



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