rsh and user environment

Hi all

I am trying to run a program from hostA to hostB using rsh, however when I execute
rsh hostB -l myuser mycommand

mycommand fails because the environment is not correct. I have checked it by running rsh hostB -l myuser set and have seen that the environment variables are not the same for when I log into the hostB with myuser.

Any hints....

Thanks

J

The rsh system normaly needs you to add the hosts of each system as follows

host one (a)
vi /etc/hosts add host a and host b including ip
vi /.rhosts "add host name b" user ... hostname_a root

host two (b)
vi /etc/hosts add host a and host b including ip
vi /.rhosts add "host name b" user ... hostname_b root

rsh hostname_a ls

Make sure the name in the host file match up with (uname -n and hostname)
:cool:

check that all the paths and expected environment settings required for the script also exist in the remote server ... if file/directory paths are already there, check the shell initialization files (i.e., $HOME/.profile, $HOME/.login, etc.) for the account running the script to make sure it is setting up the correct variables ... or --- specify them directly on the script ....