Operating System - HP-UX
1834941 Members
2120 Online
110071 Solutions
New Discussion

Re: Why I cannot rlogin but can telnet?

 
zhaogui
Super Advisor

Why I cannot rlogin but can telnet?

Hi,
# rlogin myhost
No utmp entry.You must exec "login" from the lowest level "sh".
Connection closed.
But I can telnet to the same machine,why?

Thanks,
5 REPLIES 5
S.K. Chan
Honored Contributor

Re: Why I cannot rlogin but can telnet?

You got a corrupted /etc/utmp file. On the system that you're having problem, do this ..

# mv /etc/utmp /etc/utmp.bad
# touch /etc/utmp
# vi /etc/inittab
==> change the line that has
cons:123456:respawn ....
to
cons:123456:off .....
# init q
# vi /etc/inittab
==> change the previous line that you've edit back to what it was before ..
cons:123456:respawn ...
# init q

Now try to rlogin again.
Victor_5
Trusted Contributor

Re: Why I cannot rlogin but can telnet?

check your /etc/services, /etc/inetd.conf and see your configuration about rlogin and telnet.

SHABU KHAN
Trusted Contributor

Re: Why I cannot rlogin but can telnet?

Zhaoqui,

This is usually a utmp corruption ...

Null the utmp file

prompt# > /etc/utmp

Check out these threads ...

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xac6d7e990647d4118fee0090279cd0f9,00.html

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x637f37f45ef7d4118fef0090279cd0f9,00.html

Thanks,
Shabu
U.SivaKumar_2
Honored Contributor

Re: Why I cannot rlogin but can telnet?

hi,
try this also. exit from all your subshells .
#ps
only your login shell should be running.
now rlogin again.
get back with results.
regards.
U.SivaKumar
Innovations are made when conventions are broken
zhaogui
Super Advisor

Re: Why I cannot rlogin but can telnet?

Yes, It did work. Thank you for your assistance. But I was wondering what is the root cause and why utmp can be corrupted?

Just curious, it seems "init q" only rereads inittab and it won't reboot the server, likewise for "inetd -c" which only rereads inetd.conf but doesn't restart inetd daemon.