PSM Shadow user profile not cleaned up

PSM Shadow user profile not cleaned up

231
Created On 11/10/26 11:00 AM - Last Modified 11/10/26 16:00 PM


Symptom


For PSM version 12.2.4 onwards, the PSM shadow user profile configuration was introduced.


When users initiate a connection (session) to a target machine via PSM, a PSM Shadow user is automatically created on the PSM machine and that's the user that is used to log on to the target machine and perform actions.

The purpose of the Shadow user is to isolate the session. This enables programs launched on the same server by different Vault users to run under different identities without the risk of information leaking between these sessions.

During the established session, some information is saved in the Shadow user profile, which can ultimately fill up the PSM server's storage.

PSM includes an automatic cleanup process in order to manage the PSM server's storage space. You can change the default settings, such as the threshold of the Shadow user profile folder size or which subfolders to empty.


Documentation details :

--------------------------

https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PASIMP/Configuring-the-Privileged-Session-Manager.htm


There are occasions where the shadow user profile folders on specific PSM servers were not being removed as configured.




Environment


12.2;12.6 Privileged Access Manager (PAM, self-hosted) PSM

PSM



Cause


The user profile folders could not be deleted fully due to another process having a handle on the files contained within the user profile folders. 

Possible situations:

- You configured CleanupFolders as "-" (this removes entire user profile folder as well as the user objects). If the shadow user accounts are being used in existing active session at the PSM server, the housekeeping process will fail.

- There are third party processes running on the PSM server which interfered with the PSM user profile cleaning process.


Error seen in PSMTrace logs

--------------------------------

[07/08/2022 | 10:11:03.748286] | {pid= 3716} | {tid= 7248} | STATIC | PSM\(731) | :: | PSMSC016I Attempting to find SID for local user [PSM-0611000000000000]

[07/08/2022 | 10:11:03.758250] | {pid= 3716} | {tid= 20512} | class CPSMPeriodicWorkJob * | PSM\(408) | :: | PSMSR1336I Start clearing profile of Shadow User: PSM-0611000000000000. Profile size: 1627114388

[07/08/2022 | 10:11:03.758294] | {pid= 3716} | {tid= 20512} | STATIC | PSM\(774) | :: | PSMSC017I Attempting to delete profile for local user [PSM-0611000000000000]

[07/08/2022 | 10:11:03.758409] | {pid= 3716} | {tid= 20512} | STATIC | PSM\(731) | :: | PSMSC016I Attempting to find SID for local user [PSM-0611000000000000]

[07/08/2022 | 10:11:03.759375] | {pid= 3716} | {tid= 20512} | class CCASessionCommonBaseException * | PSM\(64) | :: | PSMSC001E Session common exception occurred. PSMSC018E Failed to delete profile for local user [PSM-0611000000000000] (System error [32]: The process cannot access the file because it is being used by another process.) (Codes: -1, 32)

[07/08/2022 | 10:11:03.759489] | {pid= 3716} | {tid= 20512} | class CPSMPeriodicWorkJob * | PSM\(419) | :: | PSMSR1337W Failed to clear entire profile for shadow user [PSM-0611000000000000]. Error description: [PSMSC018E Failed to delete profile for local user [PSM-0611000000000000] (System error [32]: The process cannot access the file because it is being used by another process.)]

[07/08/2022 | 10:11:03.760305] | {pid= 3716} | {tid= 20512} | class CPSMPeriodicWorkJob * | PSM\(449) | :: | PSMSR1338I Finished clearing profile of Shadow User: PSM-0611000000000000.

--------------------------------



Resolution


For folders/files which could not be removed in previous housekeeping cycles (CleanupInterval:24 hrs), the PSM server will attempt to try to remove those folders at subsequent attempts.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001AYVCA2&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail