Sh with the following content:
[CODE]
su BotAccounts && script / dev / null && screen -AmdS minecraft java -Xms2048M -Xmx2048M -jar /home/bots/bot01/start.sh
[/CODE]
the problem here is, it will only activate the user and nothing more.
How can I solve the problem? Need to do that in a command.
With
see USER -c COMMAND
Can you run a command as another user?
The command is pretty funny, besides, what do you want to do exactly?
From a webpanel (running on root) I want to switch to the user BotAccount, then script / dev / null to enable screen and then the command to execute. Have this but a mistake in the end. Should not be start.sh but start.jar ^^
Try one; instead of &&.
possibly helps if you have a sh -c "command" around it
Something like rooting is never such a good idea. This looks like a server to me, why do not you steer it with systemd?
Script / dev / null
It is completely meaningless…
And if you want to execute a command with other rights with su:
one su
There are also runuser and setpriv.