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