4.0f su curiosity

From: <gwertz_at_BISYS-Plans.com>
Date: Thu, 13 Apr 2000 15:50:40 -0400

I have a script called test.ksh which contains...

#!/usr/bin/ksh

user_name=wystar
wystar_dir=/bwystar/wystar/ver4_10
dir_name=bin_pro

su - $user_name -c "echo $user_name ; echo `whoami` ; echo $PWD ; cd
$wystar_dir/$dir_name ; echo $PWD"


...the output of which is...

wystar
root
/home/_watson
/home/_watson

...Notice that the echo's work, but not the cd. Also notice that while it
is doing the commands, it is not really su'ing to the user.

Any ideas?
Received on Thu Apr 13 2000 - 19:51:27 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:40 NZDT