Question about using sudo su
I have a need to run a script as another user, but the current process takes three commands to do.
sudo su - user
The account is set up such that doing the 'sudo su - user' requires no password.
I am trying to get this into a single command or shell script which I can run to accomplish the same thing. I tried using the -c flag of su, however I am required to enter a password with this flag. I can't enter a password, since I haven't been given a password.
Any help would be appreciated.