rsh in a setuid shell script
Glen Ecklund
glen at meteor.wisc.edu
Wed Feb 13 10:12:37 AEST 1991
I am trying to work around a problem with our lpr software.
I would like to enable users to use a remote printer on a machine
on which they have no login.
I created a setuid program which changes uid to user lp, then does an
rsh to the machine with the printer as user lp.
#!/bin/csh -b
id
cat $* | /bin/rsh othercomputer "lpr -Pprinter"
Unfortunately, the id shows that the euid is changed to lp but not the uid.
The result is that the rsh reports "Login incorrect" (it is not logging
in as lp, but as the user who ran the script).
Is there anything I can do?
Glen
--
Glen Ecklund glen at meteor.wisc.edu
Department of Meteorology (608) 262-3086
University of Wisconsin, Madison
More information about the Comp.unix.questions
mailing list