Need to change "logname" output after "su - user"
Bill Irwin
bill at twg.wimsey.bc.ca
Tue Jul 10 16:42:03 AEST 1990
I am having a problem fooling our Uniplex package into thinking I am
another user for the purpose of accessing another mailbox. We wnat to be
able to have people who take phone messages for someone email the message
to their mailbox. The problem occurs when that person phones in to check
for messages. Uniplex doesn't provide a facility for user A to read user
B's mailbox.
The cute solution (or so I thought) was to setup a new user called "msg"
with a login password that everyone knew. Email could then be sent to
"userB,msg", putting a copy in each user's mailbox. If userB called in
for messages, I (or anyone) could drop to a shell, type "su - msg", enter
the password. The .profile for msg could be set to rum Uniplex mail and
I would be there, reading userB's messages.
The problem seems to be that, even after specifying "-" in the su
command, the output from the "logname" still reports "bill". This
command must be used by Uniplex to set its internal variable Uusername,
because after the su command I am still reading my own mailbox, not
msg's.
Is there some way of running su so that the output of the logname command
would report the username that you su'ed to? I'm still guessing that
this is what is preventing this innovative trick from working, although
after executing "su - msg", the output of "set" doesn't show any
environment variables that are exclusively mine.
One interesting thing is that if this scenario is done in a MultiView
session it works! I suspect this is because at login, prior to running
MultiView, I am on a real tty. After running Multiview I am in a pseudo
tty which runs the su. Running "logname" after the "su - msg" in
MultiView reports "msg", but the same thing not running MV reports
"bill".
Any suggestions?
--
Bill Irwin - TWG The Westrheim Group - Vancouver, BC, Canada
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
uunet!van-bc!twg!bill (604) 431-9600 (voice) | UNIX Systems
bill at twg.wimsey.bc.ca (604) 431-4629 (fax) | Integration
More information about the Comp.unix.xenix
mailing list