rsh denied on some boxes but not others

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat rsh denied on some boxes but not others
# 1  
Old 02-17-2010
rsh denied on some boxes but not others

Hi. As root, I'm running rsh as root from a Solaris 9 machine to some RHEL 4 servers (supposedly all configured identically) but two of about 10 respond with permission denied. There is no firewall device between the Solaris 9 client and the RHEL servers.

I'm doing something like this from the client:

Code:
foreach ff ($servers)
rsh $ff uname -n
end

svr1
svr2
Permission denied.
Permission denied.
svr5
svr6

I've been comparing the setup on the RHEL servers but can't figure out where the problem might exist on the 2 oddball servers. I checked /.rhosts, /etc/hosts, nsswitch.conf, /etc/pam.d/rsh, /etc/xinet.d/rsh and they're the same.

In the messages file, I see

Code:
Feb 17 16:23:55 svr3 pam_rhosts_auth[15081]: denied to root@s9clnt as root: access not allowed
Feb 17 16:23:55 svr3 in.rshd[15081]: rsh denied to root@s9clnt as root: Permission denied. 
Feb 17 16:23:55 svr3 in.rshd[15081]: rsh command was 'uname -n'

However, the /etc/pam.d/rsh file has the following entries (same as servers allowing rsh from the Solaris 9 client):

Code:
#%PAM-1.0
# For root login to succeed here with pam_securetty, "rsh" must be
# listed in /etc/securetty.
auth       sufficient   pam_nologin.so
auth       optional     pam_securetty.so
auth       sufficient   pam_env.so
auth       sufficient   pam_rhosts_auth.so
account    sufficient   pam_stack.so service=system-auth
session    sufficient   pam_stack.so service=system-auth

I'm not a RHEL expert so would appreciate any suggestions.
# 2  
Old 02-19-2010
Is rsh listed in /etc/securetty ?
# 3  
Old 02-23-2010
rsh problem

Here's the deal. There are three RHEL 4 servers I cannot rsh into as root. One already has rsh in /etc/securetty. The other two didn't so I added rsh to it. Made no difference. Do I have to restart some service?

On the other hand, there's a 4th server I can rsh into as root but it does NOT have rsh in /etc/securetty.

All 4 servers have the same /.rhosts file with the entry in /etc/hosts and the same nsswitch.conf. They also have the same /etc/pam.d/rsh file.

Don't understand. Any suggestions? Thanks.
# 4  
Old 02-23-2010
Name resolution?
Try this on source and all destination computers.
Code:
nslookup ip_address

To make this easy. When "nslookup" is run on both source and destination computers the command should respond with a name ... and give exactly the same name as is quoted in /.rhosts.
Each IP address would normally appear only once in /etc/hosts and have only one name. (I know that there are exceptions).

A .rhosts should be permissions 600 and owned by "root" or it will be ignored.

Afterthought. Check that root's home directory is actually "/" on every server. Often is is "/root" .
# 5  
Old 02-24-2010
Works!

Thanks methyl! Your afterthought was right on the money.
All my servers have /root as the home directory for root and the ones that weren't allowing rsh access didn't have .rhosts under /root - they were under /. I copied .rhosts to /root and they now all allow root rsh access.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

rsh permission denied

hi I have configured rsh-server and running rsh command on my fedora 14 machine while executing it shows permission denied, below is the output of the same. # rsh localhost date Permission denied. # but same works in other system # rsh localhost date Fri Nov 23 05:31:12 PST... (5 Replies)
Discussion started by: muzaffar.k
5 Replies

2. Solaris

new sun boxes

Hi, we plan to purchase new sun solaris server M4000 for oracle erp as we have old servers we want to upgrade it with new servers and would like to know query related to it. 1)what is Operating system version will comes with new servers and bit size either 32 bit or 64 bit?? 2)bit size... (2 Replies)
Discussion started by: maooah
2 Replies

3. AIX

RSH intermittent error rshd: 0826-813 Permission is denied.

I am getting an error from one node in a set with RSH setup between them, node one will connect to node two every other time (consistently), however node to connects to node one every time without problem. Here is what I am seeing, makes no sense to me. Can anyone help? sbhcprdb01<root>: rsh... (6 Replies)
Discussion started by: JodyTek
6 Replies

4. Shell Programming and Scripting

Permission denied while executing rsh

Hi All, I have two servers, say server1 and server2. I have put the entries of both servers in /.rhosts file of both servers. So, when I tried to run following from server1- rsh server2 "ls" Permission denied was printed on console. Can anyone help me out? Regards, akash mahakode (4 Replies)
Discussion started by: akash_mahakode
4 Replies

5. Linux

how to install rsh in linux boxes

Hi All, Please help me how to install and configure rsh in Linux boxes and let me know where i get this software. Thanks in advance... Regards, Sridhar. (3 Replies)
Discussion started by: sridhusha
3 Replies

6. Shell Programming and Scripting

rsh permission denied

Hi Gurus, Trying to search in the forum but cant seem to find anything related. I'm trying to run this script DWH_Housekeep.sh from the another server This is my command: rsh -l hulft 140.32.12.161 /usr/TRS/script/DWH_Housekeep.sh permission denied I get permission denied. ... (7 Replies)
Discussion started by: lweegp
7 Replies

7. Shell Programming and Scripting

I need a Script to rsh multiple hp boxes and shutdown

Hello I'm serving on a ship that has frequent power issues. Currently if we loose power we need to rush around to multiple UNIX machines and login to Sysadmin and power down each machine before we loose our ups. If sysadmin is asleep or not in the space we have some real problems. I would like to... (2 Replies)
Discussion started by: blackfam972
2 Replies

8. UNIX for Dummies Questions & Answers

Sun boxes

Hi, I'm looking to get hold of a sun machine capable of running Solaris 9 to help me learn unix. I've been advised to look on e-bay, but am not sure of what to look for. The below seems quite good..... http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&category=1486&item=5707567514&rd=1 ... (3 Replies)
Discussion started by: topcat8
3 Replies

9. UNIX for Dummies Questions & Answers

rsh and permission denied

Dear All I am using rsh command to work with a remote tape drive. I am getting the message 'permission denied'. What should I do to get rid of this message. Best Regards Reza (1 Reply)
Discussion started by: Reza Nazarian
1 Replies

10. Programming

text boxes, radio buttons , check boxes in c++ on unix

Hi ! Please tell me how to get radio buttons, text boxes , check boxes , option buttons , pull down menus in C++ on Unix. I think it would be done using curses.h ..but that's all i know. TIA, Devyani. (3 Replies)
Discussion started by: devy8
3 Replies
Login or Register to Ask a Question