M
M
Mysterion2018-03-16 08:54:46
linux
Mysterion, 2018-03-16 08:54:46

How to send a command to chroot as another user?

Hello. You need to run a socket server in the root, which will work all the time. Runs in the screen.
A separate user is created for it. There are several of them in the system.
/home/sockets/ socket1 /
/home/sockets/ socket2 /
...
/home/socket/ socket32 /
They have system images for chroot in their directories.
Well, there are socket1, socket2, socket32 users in the system.
Tell me how, being under the root in the system, send a command to start a socket in /home/sockets/ socket1 / in the screen with the necessary parameters and arguments on behalf of the socket1 user.
That is, so that the command in the chroot is executed on behalf of socket1, and not the chroot itself is executed from it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
polar_winter, 2018-03-16
@Mysterion

not clear
man sudo?

K
ky0, 2018-03-16
@ky0

su -c?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question