1825768 Members
3008 Online
109687 Solutions
New Discussion

rsh giving problem

 
SOLVED
Go to solution
Girish_17
Regular Advisor

rsh giving problem

HI All,
I am doing rsh from Solaris to HPUX.

# rsh -l username hostname command
But this returns an error
"Cannot get password -- error 0x6"

I have edited .rhosts for the username's home directory and added "+ +" but still the problem exists.
Password is also set to "xyz"

Thanks for your helps.
Regards,
Girish
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: rsh giving problem

Gosh, I hope this system isn't on the public Internet.

I'd check and make sure I have patches reasonably up to date.

On the HP machine I'd check the /etc/inetd.conf file and make sure the r-protocols are not commented out. If Bastille has recently been run on the HP-UX box it recommends turning these protocols off and using openssh.

Not a bad Idea come to think of it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Phil Crooker
Advisor

Re: rsh giving problem

I've had a similar problem when trying to rsh from a linux box to a sco unix machine. Very frustrating as I couldn't find any way to get debugging info.

I agree - just install ssh on both machines and setup an authorised key without a password. Does the same thing as rsh but much more reliably. (I too would hope these computers aren't exposed to hostile networks!)
Girish_17
Regular Advisor

Re: rsh giving problem

Thanks Steven and phil...
I would like to tell you that it's happening with root user and not with normal user ....
Thought could helpp you advice me something.

Thanks U very much again and hope to see your replies very soon.

Regards,
Girish
bhavin asokan
Honored Contributor

Re: rsh giving problem

hi,

i would advice you to create a /etc/hosts.equiv file. see man hosts.equiv for more details.

The /etc/hosts.equiv file and files named .rhosts found in users' home
directories specify remote hosts and users that are "equivalent" to
the local host or user. Users from equivalent remote hosts are
permitted to access a local account using rcp or remsh or to rlogin to
the local account without supplying a password (see rcp(1), remsh(1),
and rlogin(1)). The security provided by hosts.equiv is implemented
by the ruserok() library routine, (see rcmd(3N)).

In this description, hostequiv means either the system
/etc/hosts.equiv file or the user .rhosts file. Note that .rhosts
must be owned by the user in whose home directory it is found and it
must not be a symbolic link. The /etc/hosts.equiv file defines
system-wide equivalency, whereas a user's .rhosts file defines
equivalency between the local user and any remote users to whom the
local user chooses to allow or deny access.

An entry in the hostequiv file is a single line (no continuations) in
the format:

[hostname [username]] [#comment]

Thus, it can be:

+ A blank line.

+ A comment line, beginning with a #.

+ A host name, optionally followed by a comment.

+ A host name and user name, optionally followed by a comment.

A host or user name is a string of printable characters,
excluding whitespace, newlines, and #.

Names are separated by whitespace.

For a user to be granted access, both the remote host name and the
user name must "match" an entry in hostequiv. When a request is made
for access, the /etc/hosts.equiv file is searched first. If a match
is found, access is permitted. If no match is found, the .rhosts file
is searched, if one exists in the local user's home directory. If the
local user is a superuser, /etc/hosts.equiv is ignored.



regds,
RAC_1
Honored Contributor
Solution

Re: rsh giving problem

OK, I am starting from scratch.

rsh on hp-ux is restricted shell. what you want rsh or remsh????)

(for root remsh /etc/hosts.equiv is not read, Only .rhosts
1. Is root account on remote system locked?? (If the remote system is trusted, /usr/lbin/getprpw -l lockout root will give you the status. Are there any messages about root acount lcoked on remote system?? check syslog.log)

2. If option 1 is ok, do as follows.
What are perms on remote_system:/$HOME/.rhosts
Should be read for root.
What is the entry in it??
should be as follows.
system_you_are_coming_from root

Check all above and post.

Anil
There is no substitute to HARDWORK
Girish_17
Regular Advisor

Re: rsh giving problem

Thanks for all your replies.....