To run a command as a specified user:
su -c "/usr/local/bin/continuum-1.0.3/bin/linux/run.sh start" - integration
This will run the command between the speech marks as the user
su - username doesn’t seem to create a shell on Red Hat linux
(as we would expect)… It probably just runs a command as a user then drops
back to the calling shell.
su to another user on Ubuntu server, first
sudo to the
su to the user you want e.g:
patrick@server:~$ sudo -i root@server:~# su - jenkins jenkins@server:~$
- to start the environment which is almost the same as with login
environment for that user.