Solved

What is needed to allow a rsh command to run without a password

Posted on 2000-05-01
9
798 Views
Last Modified: 2008-03-10
I need to be able to rsh within a script without having to enter a password. Right now I am getting permission denied. What must be changed to allow this. I know it can be done since one network system allows this and one does not. The System Admininstrators do not know what to do.
0
Comment
Question by:andrewmchorney
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 

Expert Comment

by:Billp022500
ID: 2767258
Are you runing NIS on the unix box?
0
 

Accepted Solution

by:
Billp022500 earned 50 total points
ID: 2767296
Add users login name to the .rhosts file under / on the unix box.
This isn't verry secure, but it works..
0
 

Author Comment

by:andrewmchorney
ID: 2767545
We are working in a closed network.

Say I am on machine a and in the script I have

rsh b ls

Do I edit the .rhosts file in / on machine a or b.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:Billp022500
ID: 2767790
set a login and password on machine b
add a, add the login name to the .rhosts file on machine b. This will allow you to rsh without a password.

0
 

Author Comment

by:andrewmchorney
ID: 2770005
Bill

On the one network where I can do a rsh host ls without a password, there are no user login names in the .rhosts file. In fact the .rhosts file has only hostnames in it. What else can cause a permission denied.

I do have accounts on both machines.
0
 

Expert Comment

by:Billp022500
ID: 2770070
try and create a user on box a. like "test" assign the password and login as test.  Now login to "B" create the same user "test". Do the password thing..
Once you are able to login as test, add the user to the .rhosts file on machine b. I have tested it here.. It works..
0
 

Author Comment

by:andrewmchorney
ID: 2770103
Bill

On the one network where I can do a rsh host ls without a password, there are no user login names in the .rhosts file. In fact the .rhosts file has only hostnames in it. What else can cause a permission denied.

I do have accounts on both machines.
0
 

Expert Comment

by:Billp022500
ID: 2770116
is the hostname of box a in the .rhosts file of box b?
0
 
LVL 3

Expert Comment

by:mliberi
ID: 2804046
rshd (the program rsh and rlogin connects with) search /etc/hosts.equiv file, if user is not root, and than $HOME/.rhosts file (that must be 600).

each line /etc/hosts.equiv and ~/.rhosts contains one of the following:

+      (a single plus)
any user from any host is allowed to log in

+ username
username from any host is allowed to log in

hostname
any user from hostname is allowed to log in

hostname username
username from hostname is allowed to log in

SO:
1) create a .rhosts file in the home directory of the user you want to use on node b

2) add one of the above authentication modes to it

3) chmod 600 .rhosts
file must not be readable from any other
user

hint:
if you put a '+' in /etc/hosts.equiv file any non root user can execute commands and log in your system without giving a password. The only restriction is that the host the request is coming from must be known.
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question