So, i'm on my ubuntu server and want to execute the following command:
su -c /path/to/command -s /bin/bash -l otheruser
When i type this command in the linux command line, it perfectly asks for the password for the otheruser and executes the command.
However, when i do it like this
exec("su -c /path/to/command -s /bin/bash -l otheruser");
it doesn't do anything. I haven't of course specified a password for it yet, but it doesn't really return anything that could help me solve this problem. I have set the permissions to that command to 777 for testing purposes.
Any suggestions?