Solved

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

Posted on 2000-05-01
9
801 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Technology Partners: 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!

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

623 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