(login) behaviour.

Guangliang He ghe at nucthy.physics.orst.edu
Fri May 19 02:12:16 AEST 1989


In article <BRISTER.89May17211626 at aries.td2cad.intel.com> brister at 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 at PHYSICS.ORST.EDU
          Department of Physics    |            ghe at jacobs.CS.ORST.EDU
          Oregon State University  |  BITNET:   hegl at orstvm.bitnet
          Corvallis, OR 97331      |  PHONE:    (503) 754-4631
                                   |
-----------------------------------------------------------------------



More information about the Comp.unix.wizards mailing list