Username Linux WAPT

Share your tips or issues concerning the WAPT Console or WAPT Agent here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
thomas789
Messages: 95
Registration: May 31, 2021 - 3:44 p.m.

June 8, 2023 - 09:25

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.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

June 8, 2023 - 10:26

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())
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

June 13, 2023 - 2:13 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
thomas789
Messages: 95
Registration: May 31, 2021 - 3:44 p.m.

June 20, 2023 - 4:49 PM

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.
Locked