1823068 Members
3253 Online
109645 Solutions
New Discussion юеВ

hp-ux 10.20 remshd

 
Juanjo_1
Frequent Advisor

hp-ux 10.20 remshd

Hi, I need to perform a remote command from a nt workstation to a hp 9000D server with hp-ux 10.20. The command must be performed with the root account, so I created a $HOME/.rhosts file and I updated the /etc/hosts file, so I configured /var/adm/inetd.sec as follows:

shell allow

The result is that when I try to execute the command from the windows nt workstation I receive: "Login Incorrect"

Any idea about what may be the problem?

Thank you!
10 REPLIES 10
Francisco J. Soler
Honored Contributor

Re: hp-ux 10.20 remshd

Hi, Juanjo

Have you put the correct login name in the nt command?

What command are you issuing from nt box?

Frank.
Linux?. Yes, of course.
LucianoCarvalho
Respected Contributor

Re: hp-ux 10.20 remshd

hi,

What was the command used on NT???



Bill Hassell
Honored Contributor

Re: hp-ux 10.20 remshd

NT allows illegal characters for login names. When you go between unrelated systems, you must be aware of the rules for logins, hostnames, etc. There is no need to put an entry into inetd.sec unless you specifcally want to limit access from specific addresses.

login incorrect can be due to a *lot* of issues:

1. .rhosts MUST be 600, owned by root and readable/writable only by root.

2. The name of the NT box must be resolvable on the HP-UX box. Use nslookup and check the NT hostname first, then check that if you use the IP address, nslookup returns the hostname.

As a quick test, in .rhosts, put the hostname and then the remote user login on the PC, then repeat the line changing hostname to fully-qualified-domain-name and then the IP address as in:

ntbox ntlogin
ntbox.domain.org ntlogin
12.34.56.78 ntlogin

The 'r' commands (like remsh and rlogin) aree inherently unsercure which is why extensive va;lidation of the host occurs in remsd. You'll need to become familiar with /etc/nsswitch.conf (man switch and man nsswitch.conf) to see why nslookup is not resolving name or IP (and also look at your DNS servers)


Bill Hassell, sysadmin
Frank Slootweg
Honored Contributor

Re: hp-ux 10.20 remshd

The ~root/.rhosts file must contain the *ARPA* (not Windows) name of the NT system, followed by the *NT* (not UNIX) username. The file *must* be owned by root. And then you should use:

rsh unixhost -l root command

on the NT side.

When things still do not work, then first start with a r[em]sh from the UNIX system to itself, so you know that you have the format of inetd.sec and .rhosts right.
Juanjo_1
Frequent Advisor

Re: hp-ux 10.20 remshd

The command I use is:
rsh -l root

the .rhosts have 600 permissions, and its contents is:
nthost1 +

I think I've try everything, may it be a bug of the OS version? (hp-ux B.10.20 A 9000/811)
Frank Slootweg
Honored Contributor

Re: hp-ux 10.20 remshd

Please see also all the other requirements mentioned by Bill and me and the alternative tests I mentioned.

As to a possible bug: Possible, but very, very unlikely. For what it is worth, my HP-UX system also is 10.20.
Juanjo_1
Frequent Advisor

Re: hp-ux 10.20 remshd

I've try the remsh command to itself:
remsh hpsrv1 -l root ls

And I receive this:
rcmd: primary connection shut down

Any idea?
Francisco J. Soler
Honored Contributor

Re: hp-ux 10.20 remshd

Hi Juanjo,

please check two things:

1.- Check the file /etc/inetd.conf and be sure the line with the remshd command is uncommented.

2.- Check the file /etc/hosts.equiv and add the remote host or the sign + to allow all hosts.

Frank.
Linux?. Yes, of course.
Juanjo_1
Frequent Advisor

Re: hp-ux 10.20 remshd

Thank you Frank, but that two issues are OK.

Anybody knows if remshd writes logs somewhere? Perhaps that will be helpful.
Francisco J. Soler
Honored Contributor

Re: hp-ux 10.20 remshd

Hi again Juanjo, I have had a similar problem with remsh in a customer site, the solution was to use rexec instead remsh. You could try with rexec, the only problem is that rexec asks for the password, but perhaps this helps you.

Frank.
Linux?. Yes, of course.