I have looked at all of the FAQ's I can find as well as done
a man on rsh (remote shell) and I'm baffled by this one.
First, I am working on an AIX RS6000 with it's flavor of UNIX
(SYSV). I have a program called tryme and all it does is a
system call with the command string:
rsh remotehost 'ls'
The program (tryme) is owned by a user called "bob". The file
permissions on tryme look like this: -rwsr-x---
So I want "tryme" to run SETUID as bob, no matter who runs the
I have the .rhosts files at both the remotehost and my local
host set up properly, and "bob" has an account with the same
username at both sites as is apparent when I actually log in
to my computer as "bob" and type bob's password and then run
the tryme program. It works fine (for bob). However, when I
am logged in as me and try to run this "tryme" program, I
get an error:
rshd: 0826-811 The remote user login is not correct.
This indicates to me that even though my program is running
SETUID as bob, the system call to run rsh is somehow ignoring
the effective user id of bob and it's trying to use me as the
login user at the remote site! I don't have an account there
hence the error.
The man pages say nothing about rsh taking the real user id
instead of the effective user id. Does anybody know if this
is true or if I have gone completely mental on this?