How can I login as the _teamsserver user? I have sudoed and set the passwd for teamsserver, but it does not take it when I use the login command. I need to see the output of some scripts as they are run by teamsserver, and verify that teamsserver has the correct permissions and utilities available.
To just look at log files etc. I usually use either
sudo less /path/to/log/file
or (in case I need root access longer) run
sudo -s to get a root shell.
To run processes as another user you can use
sudo -H -u _teamserver cmd-to-run
And finally, to simulate a login there is
sudo -H -u _teamserver -i