rob@cs.aukuni.ac.nz (Rob Burrowes ) (04/12/91)
I just moved one of our hosts from one subnet to another changing it's name and IP address in the process. The new user of the machine found he could not rsh to our other hosts. The host and the ones he was trying to connect to are all DECStation 2000's running ULTRIX 4.1 (rev 52). The new hostname and ip address info were entered into both our BIND nameservers and YP servers. He had a ~/.rhosts file with the new hostname in it but the hostname was not in the /etc/hosts.equiv file (not that it helped when it was later put there). %rsh cs8 ls Could not look up address for your host. Permission denied. % I tried a nslookup on cs8, I tried ypmatch , I pinged the workstation all worked fine. I then added the workstation to the /etc/hosts file and guess what. It all worked. Well I removed it again to make sure it wasn't something else I did and it stopped again. Seems like the rshd isn't using YP or the BIND server. I had the source of a very old rshd so I looked at it and found it did a ruserok() call. Well I bashed up a little c program which passed it's arguments to ruserok() and printed the result. It worked with or without the /etc/host file entry. We also have a few VAXStations running ULTRIX 3.1 so I tried rsh to one of them. Different error message (ie. just "Permission denied.") but same basic theme. I tried adding the hostname to /etc/hosts but this time it didn't help. My little c program on the VAX said the user could rsh to it. At this point I also noticed ruserok() on ULTRIX3.1 and ULTRIX4.1 give different results for OK. One returns 0 and the other returns 1. Both return -1 if the user has no access. I haven't any solution but I thought you might like to know. -- Rob Burrowes rob@cs.aukuni.ac.nz. System Admin Computer Science Dept., Auckland University, Private Bag, Auckland, New Zealand -- New administrater uofa.