tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: 4.0f su curiosity
@ 2000-04-18 19:31 gwertz
  0 siblings, 0 replies; only message in thread
From: gwertz @ 2000-04-18 19:31 UTC (permalink / raw)
  To: tru64-unix-managers

Of all of the responses, I must say that the most accurate ones were that
"it's working exactly as it should!"

I was still having a lot of trouble getting my actual script to work
consistently, let alone properly.  So I followed up on someones suggestion
(sorry, I must have deleted the message, and I don't remember your name)
that the 'su -c' does not work properly in 4.0x.  Instead of using the -c,
I did the following...


su - wystar <<END_SU
 <various commands here>
END_SU

It seems to be more reliable.

Thanks for all the input.


The original post...

---------------------- Forwarded by Gregory P Wertz/BISYS_BPS on 04/18/2000
03:17 PM ---------------------------


gwertz@BISYS-Plans.com on 04/13/2000 03:50:40 PM

To:   tru64-unix-managers@ornl.gov
cc:    (bcc: Gregory P Wertz/BISYS_BPS)
Subject:  4.0f su curiosity




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?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-04-18 19:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-18 19:31 SUMMARY: 4.0f su curiosity gwertz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox