home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.wizards:4787 comp.unix.questions:13599
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!hamblin.math.byu.edu!yvax.byu.edu!cunyvm!aassi
- Newsgroups: comp.unix.wizards,comp.unix.questions
- Subject: Re: Passing args to login(1)
- Message-ID: <92323.143304AASSI@CUNYVM.BITNET>
- From: abraham <AASSI@CUNYVM.BITNET>
- Date: Wednesday, 18 Nov 1992 14:33:04 EST
- References: <1992Nov18.143305.2506@meaddata.com><1992Nov18.145821.4583@midway.uchicago.edu>
- Distribution: usa
- Organization: City University of New York/ University Computer Center
- Lines: 42
-
- > From: pynq@quads.uchicago.edu (George Jetson)
- > Subject: Passing args to login(1)
- > Date: Wed, 18 Nov 1992 14:58:21 GMT
- >
- > I am pretty sure that under at least some versions of Unix/login, you can
- > pass args in along with your login-id, and that these args would then be
- > available to your .login/.profile. See below:
- >
- > login: pynq and green
- > Password:
- >
- > Then $1 should be "and" and $2 should be "green".
- >
- > However, this doesn't seem to work under my current version of login
- > (and version of SunOS [4.something])
- >
- > So, my question is: "Am I imagining things, or am I doing it wrong?"
- >
- > I could of course ask questions in the login script and branch
- > accordingly, but it would be cleaner to be able to do it as a command
- > line parameter.
-
- if you only want my opinion, then you are "doing it wrong",
- but if you want information you can use then here it goes: You can pass
-
- environment variables to your process but NOT parmeters
- Under UNIX SVR3.2 (not familiar with prev. rel) login is defined as:
-
- login [name [env-var ...]]
-
- login: root TERM=vt100 NAME="unix guru" OPTIONS="NOMENU,EXPERT"
- password:
-
- after login is successful, try this:
- echo $TERM $NAME $OPTIONS
- they should be set to the values you assigned to them at login. These
- variables are governed by the same rules as ordinary environemnt vars
- so you may NOT use 1=first_parm 2=second_parm and then use $1 & $2
- login is smart and will log you out if you use an invalid identifier.
-
-
- good luck
-