Hello I have a shell script. I also would like this script to run as ammuser. Seems like the lib's and bin that I need are owned and can only be run as root.
When I run it as ammuser It fails, if I su as root it it works. I like to know how can I make my script run as ammuser then scp a tar.gz file to another server. I have created a passwordless login as ammuser on server B, but since the script cant run as root, I dont get far.
See the script