home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / solaris / 443 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  1.7 KB

  1. Xref: sparky comp.unix.solaris:443 comp.unix.shell:5185
  2. Newsgroups: comp.unix.solaris,comp.unix.shell
  3. Path: sparky!uunet!mcsun!ub4b!info-sparc1.info.ucl.ac.be!fynu.ucl.ac.be!nina
  4. From: Ninane@fynu.ucl.ac.be (Alain Ninane - FYNU)
  5. Subject: *AGAIN* CSH - Execute `target' .cshrc with `su'
  6. Message-ID: <1992Dec30.111757.5822@info.ucl.ac.be>
  7. Originator: nina@fynu1.fynu.ucl.ac.be
  8. Sender: news@info.ucl.ac.be (News Administrator)
  9. Nntp-Posting-Host: fynu1.fynu.ucl.ac.be
  10. Organization: University of Louvain (LLN) - Nuclear Physics Dept.
  11. Date: Wed, 30 Dec 1992 11:17:57 GMT
  12. Lines: 28
  13.  
  14. Yesterday, I posted a request about the execution of .cshrc file of
  15. the target user when executing su:
  16.  
  17. > On our solaris 2.1 system, we are using /bin/csh as the default shell.
  18. > When we execute:
  19. >         su otherUser
  20. > the otherUser's .cshrc file is not executed.  Is there a way to modify
  21. > this to have a BSD like behaviour (where ~otherUser/.cshrc is executed
  22. > by su).   Which parameter do I have to tune ? the path ?
  23.  
  24. I received a bunch of responses telling me to execute:
  25.     su - otherUser (i.e. with the `-' option)
  26.  
  27. This is, to my sense, not satisfactory (i.e. BSD like).  With the `-'
  28. option, su behaves like login, i.e. executes also the .login file;
  29. you are also moved to the otherUser's home directory.  I would prefer
  30. an su which does not execute the .login file and stays where you are ...
  31.  
  32. I think that the point is that system V su does not change the $USER
  33. environment variable (but only the userid).
  34.  
  35. Thanks,
  36. Alain
  37. -- 
  38. Dr. Alain H. Ninane     | Tel : +32-10-47.32.32 - Fax: +32-10-45.21.83
  39. University of Louvain   | Internet: Ninane@fynu.ucl.ac.be
  40. Nuclear Physics Dept.   | Ch. du Cyclotron, 2
  41. B-1348 Louvain-la-Neuve | BELGIUM               
  42.