Find files not accessed on a remote server and delete - Help!

Hi Guys,
I am currently working on a script to find all the files that have not been accessed for the past 2 years. This, i guess has been discussed n number of times in this forum. Now, my requirement is to find all the files in the remote windows server. I have it mounted in unix.

I was thinking of doing a rsh to the remote server, find all the files and delete it. This is the command i tried -

rsh -l USER <SERVER> find <TOP LEVEL DIR> -atime <2years> -exec rm -r {} \;

I am getting a permission denied error, which i guess is because i do not have permissions to do an rsh.

My question, Will this command work as expected? Can i do an rsh to the remote windows server and remove the files there?

Are there any other methods of doing this?

Thanks,
Ashwin

Can you confirm the following info...

  1. Have you entered windows host in /etc/hosts file
  2. and /etc/hosts.eqiv or relevent files

check the same.

It might also be port issue( rsh port).