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.
Asked
Active
Viewed 1,341 times
1
1 Answers
1
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
nohillside
- 100,768
-
Actually, it seems to work, but it is still not running as teamsserver. When I check (echo $ENVVAR) an environment variable that I know is set in teamsserver, it does not show – Siriss Oct 03 '13 at 18:31
-
-ireads.profilefrom the home directory of the user, in this case from/var/teamserver– nohillside Oct 04 '13 at 03:42
sudoto look at any log files (orsudo -sto get a root shell), would this work for you as well? – nohillside Oct 03 '13 at 17:47