In my shell script (bash) I want to call other shell scripts.
I run my script as user_A.
One of these scripts needs special handling:
- It has to be run as different user (user_B). Password needed here.
- It is interactive, but not only asks questions but runs another script in name of another user (user_C) using su. I have to enter a password here as well.
I can use su calling this script but its questions have to be answered somehow. I can not enter anything because it prints for each questons "stty: : Not a typewriter"
I'm calling the special script this way
su user_B << ABC
...
special_script
...
ABC