User logged in via webpage

Hello,

is there a way to figure out if and which user is logged in via the Luci webpage?
I want to run a script when a user loges in via the webpage until the user closes the tab/window or logs out again.
echo "$USER" via SSH only gives me the user of the SSH session.

Thanks very much!

logread captures login

# logread -f
Fri Feb 10 09:18:18 2023 daemon.err uhttpd[22287]: [info] luci: accepted login on / for root from
2 Likes

Thanks for your help, that would work.
In the end I didn't need to know which user is logged in.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.