Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2000-05-01
9
Medium Priority
?
807 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
ID: 2767258
Are you runing NIS on the unix box?
0
 

Accepted Solution

by:
Billp022500 earned 100 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.
Suggested Courses

824 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