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

rsh -l root pwd

To be able to run this command I've created the /etc/hosts.equiv file on the UNIX machine, which contains: 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: permission denied
rsh: can't establish connection

I tried to change the UNIX user to notroot:

rsh -l notroot pwd

The command gave the same result: 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:


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?

  • 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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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