SUMMARY - Is it possible to su to another user in middle of korne script?

From: <Graham.Charley_at_uk.nestle.com>
Date: Wed, 12 Jul 2000 15:24:50 +0100

Thanks to all those who responded.
 
The consensus of opinion is to use the -c option for su which enables
another users privs to be accessed without generating a new shell for that
user
su - <user> -c "<command; command; etc>"

using rsh having first set up user in .rhosts on remote machine, was also
suggested
 
a further suggestion which I include in full sounds interesting, and I shall
try at some later date
Get TCL/TK & expect. Expect allows you to run interactive commands (like a
shell)in a script, sending data to the process and reading the response and
taking appropriate actions.

Graham Charley
Received on Wed Jul 12 2000 - 14:27:00 NZST

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