home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / admin / 5034 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  2.9 KB

  1. Path: sparky!uunet!pipex!warwick!uknet!doc.ic.ac.uk!cc.ic.ac.uk!carrion.cc.ic.ac.uk!vulture
  2. From: vulture@carrion.cc.ic.ac.uk (Thomas Sippel - Dau)
  3. Newsgroups: comp.unix.admin
  4. Subject: Re: Pros/Cons: simple vs. fully-qualified name for workstation?
  5. Message-ID: <1992Sep14.193922.5297@cc.ic.ac.uk>
  6. Date: 14 Sep 92 18:39:22 GMT
  7. References: <420@bertha.HyperDesk.com>
  8. Reply-To: cmaae47@cc.ic.ac.uk
  9. Followup-To: poster, comp.unix.admin, andy_d@hyperdesk.com
  10. Organization: Imperial College of Science, Technology and Medicine
  11. Lines: 53
  12. Nntp-Posting-Host: cscgc
  13.  
  14. In article <420@bertha.HyperDesk.com>, andy_d@hyperdesk.com writes:
  15. - It has been suggested to me that I name my workstation with a
  16. - fully-qualified name instead of a simple name, e.g. name it
  17. - "sweetjane.hyperdesk.com", instead of just "sweetjane". 
  18. .....
  19. - 1) login scripts that check the host name via the 'hostname' command 
  20. -    won't work anymore.
  21. - 2) if we change things around at a later time, so that my machine is
  22. -    part of domain devt.hyperdesk.com, my machine name will be
  23. -    misleading, and many not even be accessible (anybody know?).
  24. - What are the supposed advantages of a fully-qualified name?
  25. Basically, all the advantages and disadvantages of using a constant instead
  26. of a variable. Constants have the same meaning everywhere, variables must
  27. be initialized before they are used. Thus if your host calls itself sweetjane
  28. and you log into my machine and run xclock, then that will appear not on your
  29. machine but on the machine sweetjane here, where it is probably unwanted.
  30. Reason: Xclock has been handed a variable as a display name and used it as if
  31. it was a constant. 
  32.  
  33. Conversely, constants are notorioulsy difficult to maintain accurate, as you
  34. pointed out.
  35.  
  36. Check what the hostname command actually does. You may put another hostname
  37. command before it into the path such as:
  38.  
  39. #!/bin/sh
  40. #
  41. #    replacement hostname - oops, here is another variable vs constant issue
  42. #
  43. /usr/bsd/hostname | cut -d. -f1
  44.  
  45. You could also recommend that login scripts etc. use the environment variable
  46. HOSTNAME rather than the output of the command hostname - it is more efficient
  47. anyway, and only marginally less secure. You may need to make sure it is 
  48. available on all machines.
  49.  
  50. Finally, get an idea how important the applications are to you that no longer
  51. work with fully qualified hostnames. Most probably you find a lot of stuff
  52. that has string length restrictions. (shouldn't they have allocated the 
  53. memory rather than just using a constant length ?)
  54.  
  55.                                  Thomas
  56. -- 
  57. *** This is the operative statement, all previous statements are inoperative.
  58. *   email: cmaae47 @ cc.ic.ac.uk (Thomas Sippel - Dau) (uk.ac.ic.cc on Janet)
  59. *   voice: +44 71 589 5111 x4937 or 4934 (day), or +44 71 823 9497 (fax)
  60. *   snail: Imperial College of Science, Technology and Medicine
  61. *   The Center for Computing Services, Kensington SW7 2BX, Great Britain
  62.