Hi,
Thanks for using Wazuh!
One way you could detect a user logging on a device with Wazuh Agent on it could be to create a rule that detects the login of a any or a partiuclar user you want and fires an alert if the conditions are met.
You can acomplish this by creating a new custom rule inside
/var/ossec/etc/rules/local_rules.xml you can learn more about Wazuh ruleset, the sintax and how to create a custom rule on this
documentation.
An example of rule that fires when an specific user logs in can be find
here and is the following:
<rule id="140101" level="12">
<if_group>authentication_success</if_group>
<user negate="yes">wazuh|root</user>
<description>Unexpected user successfully logged to the system.</description>
</rule>
This example rule will trigger an alert if a user different thant root or wazuh successfully login into the system. You should be able to see this and other alerts on your Wazuh Dashboard.
Regards.