3

Running RSH commands on a Windows box against a Linux box works only for the administrator user. Is there a file somewhere that has a list of users that can run commands remotely?

More Info

The server configuration is automated by VMware's product... There's no /etc/hosts.equiv file setup but there is a /root/.rhosts file with an entry of [IP ADDRESS] +.

The SUA client C:\Windows\SUA\bin\rsh can login when run as the local administrator account but no other user can login. The error is: rcmd: unknown user: [username]. The command I'm trying to run is: rsh -l root [IP ADDRESS] ls.

Andy Arismendi
  • 1,168
  • 4
  • 16
  • 27

1 Answers1

1

I agree with Jacob that this is a VBI, but the following should help you.

To rlogin/rcp/rsh to a machine without enter a password, you should have $HOME/.rhosts file defined on the target machine if you are trying to login as root. If you try to login as non-root, make sure the user is in /etc/passwd and the host you are login from is defined in either /etc/hosts.equiv or $HOME/.rhosts files. Both /etc/hosts.equiv and $HOME/.rhosts file should contain the host name that are allowed to connect. Optionally, you can associate a user name with that host name to narrow the permission to just those users. So, the format should look like th following line:

hostname [username]

Both rsh or rlogin prompt for a password. All you need to do is open /etc/hosts.equiv file on host system and add entries for all hosts you would like use without password .

This file list of hosts and users that are granted "trusted" r (rsh/rloging) command access to your system without supplying a password.

$ cat /etc/hosts.equiv

Output: Domain.com

a.domain.com

b.domain.com

In above file "a" and "b" hosts can connect without a password.

Caution: R (rsh/rlogin) commands are very insecure if possible switch to secure shell (ssh). You can configure ssh so that is does not prompt for a password.

=====

Based on your edits, I'm pretty sure that you are connecting from Server 2008 to an AIX box. I'll bet that since this worked fine in 2003, you are using the MS default install, which will NOT let you use a local user to rsh because of changes MS made to IPV6 in their SUA install (interix v6). Remember, Server 2003 did not have IPV6 enabled by default.

First, save yourself some time and disable IPV6 on the network adapter that you are using and see if this sorts everything out. If you need IPV6 (C'mon, really?!) you will need an updated package from interix (the guys who made the SUA for MS) so that you can get an "updated" version (actually IPV4 only) rsh version from Interix. There are 2 steps:

You need to have the installer pkg installed first and then you can add the package with the command "pkg_update -L rsh".

The pkg installer is not part of the MS installation. Refer to this web page for more information about pkg: http://www.suacommunity.com/pkg_install.htm

Make sure that you are logged in as a local administrator and that you run the package install and the pkg_update command from the sua prompt.

G Koe
  • 323
  • 2
  • 7
  • Are you using VMware workstation 5 or 6? Time to upgrade! – G Koe Mar 01 '12 at 03:12
  • Thanks for the info @GKoe :-) I added some more information to my question. Please take a look – Andy Arismendi Mar 01 '12 at 04:27
  • I bet you were using this on a server 2003 machine with no problems and now are having an issue in server 2008? You need a different version of the SUA. If you went to Programs and Features, enabled SUA and then installed the "Utilitiies for Subsystem for Unix-based Applications" pack from the Microsoft website, this is what is causing your issue. Please see my edited answer for additional help as I know some folks who had this problem in vista and server 2008. – G Koe Mar 01 '12 at 04:40
  • Things used to work on 2003 indeed :-) Now on 2008 with [SUA SDK](http://www.microsoft.com/download/en/details.aspx?id=23754) and no worky :-( – Andy Arismendi Mar 01 '12 at 04:52
  • Can you add the info that helped the folks on vista/2008 please? – Andy Arismendi Mar 01 '12 at 05:08
  • Sorry, I had to make sure my links were good. Please bear in mind that I have not had this specific problem, I am supplying the information that I found for a fellow user. – G Koe Mar 01 '12 at 05:21
  • I saw a thread on SUA community talking about IPv6 so I disabled it already using the fix thingy Microsoft [provides](http://support.microsoft.com/kb/929852) (and rebooted). I'll give this other version a try. The Linux box is running ttylinux, I don't know what AIX is... – Andy Arismendi Mar 01 '12 at 05:34