How to know who is connected on a container with lxc exec?

How to know who is connected on a container with lxc exec?

as “w” won’t say anything…

Hi!

lxc exec launches a process in a container. Depending on what you are exec-ing, inside the container you would be seeing a process with certain characteristics.

Consider this lxc exec. Here, you specify the UID and GID of the process in the container.

$ lxc exec mycontainer --user 1000 --group 1000 --env HOME=/home/ubuntu/ -- bash 

Therefore, your question on whether you can get a hint of the user from the host that has just lxc exec, I think the answer is that you cannot see that from within the container.