D
David Mathog
On a Solaris 8 system if a user "joe" logs in, for instance via ssh,
cuserid() returns "joe". That's the expected behavior and so far so
good. However if that user then does:
% su - sally
cuserid will still return "joe". However "sally" uses "tcsh" where
whoami shows "sally". If the user running as "sally"
creates a file the ownership is for "sally". "ps -ef"
also shows the user shell running as "sally". While "sally"
printenv and set don't show any "joe" assignments. All of this is
as expected except that cuserid() seems to hang onto "joe"
when all other programs see only "sally".
Is this the expected behavior of cuserid()?
If so, which is the proper function to use to return "sally"
following the su change to the "sally" account?
Thanks,
David Mathog
cuserid() returns "joe". That's the expected behavior and so far so
good. However if that user then does:
% su - sally
cuserid will still return "joe". However "sally" uses "tcsh" where
whoami shows "sally". If the user running as "sally"
creates a file the ownership is for "sally". "ps -ef"
also shows the user shell running as "sally". While "sally"
printenv and set don't show any "joe" assignments. All of this is
as expected except that cuserid() seems to hang onto "joe"
when all other programs see only "sally".
Is this the expected behavior of cuserid()?
If so, which is the proper function to use to return "sally"
following the su change to the "sally" account?
Thanks,
David Mathog