Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have two machines running Solaris 9 (192.168.2.9) and Windows XP (192.168.2.5). I need to run the following command on the Windows machine:

rsh 192.168.2.9 -l root pwd

To be able to run this command I've created the /etc/hosts.equiv file on the UNIX machine, which contains:

192.168.2.5 xp.user

where xp.user is the name of the active XP account, under which the rsh command connects.

The command gives the following messages:

192.168.2.9: permission denied
rsh: can't establish connection

I tried to change the UNIX user to notroot:

rsh 192.168.2.9 -l notroot pwd

The command gave the same result:

192.168.2.9: permission denied
rsh: can't establish connection

But when I created the file /home/notroot/.rhosts with the same contents as /etc/hosts.equiv the result was OK:

/home/notroot

Both the hosts.equiv and .rhosts files are identical and were created in the UNIX vi editor. The empty lines are added at the end of each file. The properties of the files are:

/etc/hosts.equiv - group: root; owner: root; permissions: owner: RW

/home/notroot/.rhosts - group: other; owner: notroot; permissions: owner: RW

The choice of rsh protocol and the root account doesn't depend on me.

So, how can I run the rsh command under the root account?

share|improve this question
    
Have you tries putting the mentioned .rhosts under ~root? –  peterph Apr 2 '13 at 14:52
    
I have no such directory. –  Snowjay Apr 3 '13 at 9:56
    
you root user doesn't have a home directory (which is what the tilda stands for - ~userxyz/ is home directory of userxyz)? –  peterph Apr 3 '13 at 10:08
    
Yes, it works! In my system the home directory for root is "/" (which is the default, AFAIK), so I placed .rhosts there. But I also had to change the permissions of the file to 'group: root; owner: root; permissions: owner: RW'. With its original permissions (group: other; owner: notroot; permissions: owner: RW) it didn't work. Thank you for the advice! –  Snowjay Apr 3 '13 at 12:56
    
/ is not the default home directory for root, and should never be set so! The usual location of root's $HOME is /root. –  peterph Apr 4 '13 at 22:34

1 Answer 1

up vote 1 down vote accepted

Workaround is placing the .rhosts file into root's home directory (see comments under the question).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.