andrewmchorney
asked on
What is needed to allow a rsh command to run without a password
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.
Are you runing NIS on the unix box?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
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.
add a, add the login name to the .rhosts file on machine b. This will allow you to rsh without a password.
ASKER
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.
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.
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..
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..
ASKER
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.
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.
is the hostname of box a in the .rhosts file of box b?
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.
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.