Linux Debian like screen over specific user (other user)?

Wr
5

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.

St

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?

Wr

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 ^^

Ha

Try one; instead of &&.

possibly helps if you have a sh -c "command" around it

St

Something like rooting is never such a good idea. This looks like a server to me, why do not you steer it with systemd?

Ad

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.