Operating System - HP-UX
1823063 Members
3144 Online
109645 Solutions
New Discussion юеВ

tcp/telnet: unknown service (telnet problem)

 
SOLVED
Go to solution
Jeevan_4
Advisor

tcp/telnet: unknown service (telnet problem)

Hi,

I have installed HP-UX 11.11 and i am not able to do telnet to this machine.

when i run telnet i am getting the error message:-

telnet tcp/telnet: unknown service

i am getting the similar error even for ftp.

I have entries of telnet in /etc/services and /etc/inetd.conf.

I can ping by hostname and ipaddress, but not telnet localhost.

Please suggest.

thanks
JK

12 REPLIES 12
Aussan
Respected Contributor

Re: tcp/telnet: unknown service (telnet problem)

take a look at KBRC00003987

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c01004664-1

if the link does not work, here is the content

PROBLEM

The system would not accept any new rlogin sessions, testing showed telnet and
ftp also failed with the same error of unknown service being shown in
syslog.log.

CONFIGURATION

Unix 11.0

RESOLUTION

The problem was casued by a corruption in the /etc/nsswitch.conf file.
This file had an entry for the /etc/services file which was corrupt, replacing
the nsswitch.conf file with a new copy resolved the problem. There are several
sample copies of the nsswitch.conf file provided on hpux 11.0 systems.
There is a man page, "man switch" which describes the function of the file
nsswitch.conf.
The tongue weighs practically nothing, but so few people can hold it
Jeevan_4
Advisor

Re: tcp/telnet: unknown service (telnet problem)

Hi,

I have tried replacing the nsswitch.conf file.

Now when i try telnet, i am getting error:-

telnet: unable to connect to remote host: connection refused.

Please suggest.

thanks,
JK
Ivan Krastev
Honored Contributor

Re: tcp/telnet: unknown service (telnet problem)

Can you try :
telnet 127.0.0.1

and paste content of nsswitch file.

regards,
ivan
Jeevan_4
Advisor

Re: tcp/telnet: unknown service (telnet problem)

when i try telnet 127.0.0.1 i am getting the same error - unable to connect to remote host. connection refused.

Here is the nsswitch.conf file

# cat nsswitch.conf
passwd: compat
group: compat
hosts: files [NOTFOUND=return] dns
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
#services: nis [NOTFOUND=return] files

thanks,
JK
Jeevan_4
Advisor

Re: tcp/telnet: unknown service (telnet problem)

when i try telnet 127.0.0.1 i am getting the same error - unable to connect to remote host. connection refused.

Here is the nsswitch.conf file

# cat nsswitch.conf
passwd: compat
group: compat
hosts: files [NOTFOUND=continue] dns
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
#services: nis [NOTFOUND=return] files

thanks,
JK
Ivan Krastev
Honored Contributor

Re: tcp/telnet: unknown service (telnet problem)

Another question - paste the line from inetd.conf containing telnet:

grep telnet /etc/inetd.conf


regards,
ivan
Jeevan_4
Advisor

Re: tcp/telnet: unknown service (telnet problem)

Here is the output

# grep telnetd /etc/inetd.conf
telnet stream tcp nowait root /usr/lbin/telnetd telnetd

thanks,
JK
Anshumali
Esteemed Contributor

Re: tcp/telnet: unknown service (telnet problem)

check the permission on the /usr/lbin/telnetd
-r-xr--r-- 1 bin bin 94208 Sep 16 2002 /usr/lbin/telnetd

Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Aussan
Respected Contributor

Re: tcp/telnet: unknown service (telnet problem)

in your nsswitch you have services commented out
#services: nis [NOTFOUND=return] files

uncomment it and try again
The tongue weighs practically nothing, but so few people can hold it
Aussan
Respected Contributor
Solution

Re: tcp/telnet: unknown service (telnet problem)

after you uncomment the services in nsswitch also kill inetd and start it again

inetd -k
inetd
inetd -c
The tongue weighs practically nothing, but so few people can hold it
Jeevan_4
Advisor

Re: tcp/telnet: unknown service (telnet problem)

I have the same permissions, here is the output

# ls -l /usr/lbin/telnetd
-r-xr--r-- 1 bin bin 94208 Mar 27 2002 /usr/lbin/telnetd

thanks,
JK
Jeevan_4
Advisor

Re: tcp/telnet: unknown service (telnet problem)

uncommenting the services and restarting inetd worked..

Thanks a lot..

JK