Path: utzoo!attcan!uunet!tank!ncar!unmvax!deimos.cis.ksu.edu!rutgers!orstcs!nucthy!ghe From: ghe@nucthy.physics.orst.edu (Guangliang He) Newsgroups: comp.unix.wizards Subject: Re: (login) behaviour. Message-ID: <10689@orstcs.CS.ORST.EDU> Date: 18 May 89 16:12:16 GMT References: Sender: usenet@orstcs.CS.ORST.EDU Reply-To: ghe@nucthy.PHYSICS.ORST.EDU (Guangliang He) Distribution: comp Organization: Dept. of Physics, Oregon State University Lines: 43 In article brister@td2cad.intel.com (James Brister) writes: =Is this standard operating procedure for UN*X or just Ultrix 2.2? Basically, =when running the command ``login'' in a subshell, the username of the original =shell gets changed when the subshell exits. I know that login replaces the =current process, but I thought that putting it in () would get around that. Is =``su'' the solution? T-I-A. = =% who am i =andrea!brister ttyp0 May 17 21:04 (ARIES) =% users =bhargav brister =% (login) =login: testacct => who am i =andrea!testacct ttyp0 May 17 21:04 => users =bhargav testacct => exit =logout =% who am i =andrea!testacct ttyp0 May 17 21:04 =% users =bhargav testacct =% logout = In csh, login is a build-in shell command. Following is I quoted from csh(1) man page: login Terminate a login shell, replacing it with an instance of ^^^^^^^^^ /bin/login. This is one way to log off, included for compati- bility with sh(1) ----------------------------------------------------------------------- | USMAIL: Guangliang He | INTERNET: ghe@PHYSICS.ORST.EDU Department of Physics | ghe@jacobs.CS.ORST.EDU Oregon State University | BITNET: hegl@orstvm.bitnet Corvallis, OR 97331 | PHONE: (503) 754-4631 | -----------------------------------------------------------------------