I know questions similar to this have been asked, but I haven't seen this exact situation answered (though feel free to close if it is indeed a duplicate).
I am on a corporate network, so I do not have access to modify the /etc/sudoers file.
We use sudo -u svc_produser -i to switch users into an interactive shell. Each time, this prompts me for my password. I would like a way of automating passing in my password, and, if possible, immediately running commands when logged in as the service user.
I can't pipe the password in, because -i doesn't work with -S (--stdin).
At previous companies, I have achieved this with expect scripts, but I don't have that at my disposal either.
I do have Python available, but I'm hoping there's a simple Bash-y way to achieve this.