Solved

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

Posted on 2000-05-01
9
757 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
  • 5
  • 3
9 Comments
 

Expert Comment

by:Billp022500
Comment Utility
Are you runing NIS on the unix box?
0
 

Accepted Solution

by:
Billp022500 earned 50 total points
Comment Utility
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
Comment Utility
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
 

Expert Comment

by:Billp022500
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:andrewmchorney
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
is the hostname of box a in the .rhosts file of box b?
0
 
LVL 3

Expert Comment

by:mliberi
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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 …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now