Page 1 of 1

Username Linux WAPT

Published: June 8, 2023 - 9:25 AM
by thomas789
Hello,

- WAPT Enterprise 2.4
- agent version: 2.2.3
- server OS (Linux)
- administration OS (Windows)

Hello, I've noticed that the username information for some of my Linux workstations is returning "gdm" instead of the session username. Do I need to create a package to return this information, or should I review the configuration of the agents deployed on the Linux machines (they are running Ubuntu 22.04)?

Thank you, Thomas.

Re: Username Linux WAPT

Published: June 8, 2023 - 10:26
by sfonteneau
Good morning

On the machines that have the problem, can you run these commands to see the result?

Code: Select all

loginctl list-sessions

Code: Select all

waptpython
import psutils
print(psutil.users())

Re: Username Linux WAPT

Published: June 13, 2023 - 2:13 PM
by dcardon
Hi Thomas,

when you mention the username, are you referring to the last_logged_on_user, the logged_on_user, or another inventory attribute?

Are users logged in when this behavior occurs?

Actually, after reviewing the code, I think this function can be significantly improved. I'll discuss it with my colleagues.

Best regards,

Denis

Re: Username Linux WAPT

Published: June 20, 2023 - 4:49 PM
by thomas789
Hello,

The problem seems random; it reverts to the correct username instead of "gdm," which is quite strange. And the user, at the moment I see "gdm," is indeed logged in with the username I'm supposed to see.

@dcardon > I was referring to "Logged in users" in my request.

I also tried creating a package using the commands recommended above, but nothing is flagged in the audit log when I put the package on the machine... (I'd like to correct "import psutils" > "import psutil")

Regards, Thomas.