when I am in a tmux session and execute "who am i" I don't get anything back. It seems tmux somehow breaks "who am i". Is there a fix for that?
Edit to clarify what is happening:
I have a script that is executed as root user and I want to be able to log who executes it.
- Logs in with their user using ssh
- Does an
- Executes the script then
who am ireturns the login user and IP of the clent
I noticed if someone uses tmux in between then this doesn't work anymore
- Log in with their user using ssh
- tmux (in case they get disconnected)
who am ireturns nothing.