All Questions

Tagged with
Filter by
Sorted by
Tagged with
4
votes
3answers
3k views

linux launch script /etc/init with a specific user

I've created a script in /etc/init/mms-agent.conf : start on runlevel [2345] stop on runlevel [06] exec /usr/bin/env python /home/mms/mms-agent/agent.py >> /home/mms/agent.log 2>&1 ...
2
votes
2answers
15k views

Changing user in a script?

I am trying to change user in order to execute a specific command during startup. It fails silently and apparently the userchange isn't carried out as I can tell that the command isn't executed. What ...
0
votes
1answer
365 views

Why does sudo su -l user -c bash fail to load user's environment?

I would like to be able to spawn a fully working shell environment from upstart script. Why does sudo su -l user -c bash fail to load user's environment properly? $ sudo su -l -m adam -c "bash" ...
0
votes
1answer
89 views

Bash / upstart - launch command under another user, replacing current process

I'm starting a process foobar as an upstart service which should be run under user joe. For this I'm using su -c: script su -c "foobar" joe end script However the su process is still lying ...