Unix Programming - Need help determining "name" of system on company network

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > August 2005 > Need help determining "name" of system on company network





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Need help determining "name" of system on company network
bkimelman@hotmail.com

2005-08-22, 5:59 pm

Here at the office, we have a large number of systems (some HP, some
IBM, etc...)
of the corporate network.

When I connect to one of the systems, an HP system, via telnet or ftp,
I use a name which is not the same value as that reported by the UNIX
"hostname" or "uname" commands; i.e. I connect from my PC using
"telnet qaz" and when I logon to the UNIX system the "hostname" and
"uname" commands tell me that the name of the system is "hp99". I would
like to be able to determine the "name" I used on the telnet command on
my PC (so I can use it to set my command prompt amongst other things).

I seem to recall something about the "ypcat" command being able to
lookup hosts (among other things) but when I attempt to run "ypcat
hosts" I receive an error message informing me that "the NIS domain
name hasn't been set on this machine".

So, is it even possible for me, after I complete my logon process, to
determine the value of the "system name" I used on the telnet command
from my PC ?

Any solution wowuld be appreciated.

Robert Harris

2005-08-22, 5:59 pm

bkimelman@hotmail.com wrote:
> Here at the office, we have a large number of systems (some HP, some
> IBM, etc...)
> of the corporate network.
>
> When I connect to one of the systems, an HP system, via telnet or ftp,
> I use a name which is not the same value as that reported by the UNIX
> "hostname" or "uname" commands; i.e. I connect from my PC using
> "telnet qaz"

What recognises this name "qaz"? Either it is in your /etc/hosts file
under a wrong name or your corporate network's DNS is screwed.

Robert
Gordon Burditt

2005-08-22, 5:59 pm

>Here at the office, we have a large number of systems (some HP, some
>IBM, etc...)
>of the corporate network.
>
>When I connect to one of the systems, an HP system, via telnet or ftp,
>I use a name which is not the same value as that reported by the UNIX
>"hostname" or "uname" commands; i.e. I connect from my PC using
>"telnet qaz" and when I logon to the UNIX system the "hostname" and
>"uname" commands tell me that the name of the system is "hp99". I would
>like to be able to determine the "name" I used on the telnet command on
>my PC (so I can use it to set my command prompt amongst other things).


Use a reverse DNS lookup of the host's IP address (or one of it's
addresses, excluding 127.0.0.1). This assumes that the network even
has reverse DNS set up, and does it correctly.

>So, is it even possible for me, after I complete my logon process, to
>determine the value of the "system name" I used on the telnet command
>from my PC ?


No, on the grounds that a host can have many DNS A records pointing
at it, some of them potentially objected to by the owner of the
systems, and a reverse DNS lookup may find only some of them, which
may or may not include the name you used. It should find a name (or
maybe more than one) you CAN use on the telnet command.

Gordon L. Burditt
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com