home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / wizards / 4787 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  2.1 KB

  1. Xref: sparky comp.unix.wizards:4787 comp.unix.questions:13599
  2. 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
  3. Newsgroups: comp.unix.wizards,comp.unix.questions
  4. Subject: Re: Passing args to login(1)
  5. Message-ID: <92323.143304AASSI@CUNYVM.BITNET>
  6. From: abraham <AASSI@CUNYVM.BITNET>
  7. Date: Wednesday, 18 Nov 1992 14:33:04 EST
  8. References: <1992Nov18.143305.2506@meaddata.com><1992Nov18.145821.4583@midway.uchicago.edu>
  9. Distribution: usa
  10. Organization: City University of New York/ University Computer Center
  11. Lines: 42
  12.  
  13. > From: pynq@quads.uchicago.edu (George Jetson)
  14. > Subject: Passing args to login(1)
  15. > Date: Wed, 18 Nov 1992 14:58:21 GMT
  16. >
  17. > I am pretty sure that under at least some versions of Unix/login, you can
  18. > pass args in along with your login-id, and that these args would then be
  19. > available to your .login/.profile.  See below:
  20. >
  21. >         login: pynq and green
  22. >         Password:
  23. >
  24. >         Then $1 should be "and" and $2 should be "green".
  25. >
  26. > However, this doesn't seem to work under my current version of login
  27. > (and version of SunOS [4.something])
  28. >
  29. > So, my question is: "Am I imagining things, or am I doing it wrong?"
  30. >
  31. > I could of course ask questions in the login script and branch
  32. > accordingly, but it would be cleaner to be able to do it as a command
  33. > line parameter.
  34.  
  35.     if you only want my opinion, then you are "doing it wrong",
  36. but if you want information you can use then here it goes: You can pass
  37.  
  38. environment variables to your process but NOT parmeters
  39. Under UNIX SVR3.2 (not familiar with prev. rel) login is defined as:
  40.  
  41. login [name [env-var ...]]
  42.  
  43. login: root    TERM=vt100 NAME="unix guru" OPTIONS="NOMENU,EXPERT"
  44. password:
  45.  
  46. after login is successful, try this:
  47. echo $TERM $NAME $OPTIONS
  48. they should be set to the values you assigned to them at login.  These
  49. variables are governed by the same rules as ordinary environemnt vars
  50. so you may NOT use 1=first_parm 2=second_parm and then use $1 & $2
  51. login is smart and will log you out if you use an invalid identifier.
  52.  
  53.  
  54. good luck
  55.