PSM: How the Automatic PSM Shadow User deletion works

PSM: How the Automatic PSM Shadow User deletion works

277
Created On 11/10/26 11:00 AM - Last Modified 11/10/26 12:58 PM


Environment


12.6;13.0;14.0;14.2;14.3;14.4;14.1;14.5;14.6;15.0 Privileged Access Manager (PAM, self-hosted);Privilege Cloud PSM;Privilege Cloud PSM

Procedure


The automatic deletion of Shadow User profiles in Privileged Session Management (PSM) is governed by four key checks:

1. UserProfileThreshold

  • Defines the maximum size of a Shadow User profile.
  • Default: 100 MB.
  • You can customise this threshold to suit your environment.

2. CleanupInterval

  • Determines how often the cleanup job runs.
  • Default: Every 24 hours.
  • Profiles are only deleted when they exceed 70% of the defined threshold (e.g., 70 MB if the threshold is 100 MB).

3. CleanupFolders

  • Specifies which folders within the Shadow User profile are cleaned.
  • Default: Desktop, Documents, Downloads, Favourites, Links, Music, Pictures, Saved Games, Videos.
  • To delete everything, set CleanupFolders to "-".

4. Profile Usage

  • Profiles currently in use during the cleanup attempt are ignored and retained.

Modifying Default Settings

To change the default Shadow User profile settings:

  1. In the Privilege Cloud Portal, navigate to: Administration > Configuration Options > Privileged Session Management > General Settings > Server Settings.
  2. Right-click Server Settings and select Add User Profile Settings.

For detailed instructions, refer to the official documentation:
https://docs.cyberark.com/privilege-cloud-standard/latest/en/content/privilege%20cloud/privcloud-cleanup-shadow-user.htm


Important Notes

  • Automatic deletion only succeeds when the Shadow User and associated target accounts are not in use on each PSM machine.
  • The clean up job evaluates all profiles and deletes those meeting the conditions above.

Example PSMTrace Log Entries

Start of Cleanup Job:

[26/11/2025 | 02:51:03.067700] | {pid=7208} | {tid=3044} | class CPSMPeriodicWorkJob * | PSM\PSMServer\PSMPeriodicWorkJob.cpp(266) | :: | PSMSR1335I Start clearing Shadow users profiles.
[26/11/2025 | 02:51:03.080070] | {pid=7208} | {tid=3044} | STATIC | PSM\CASessionCommonLib\OSServices.cpp(730) | :: | PSMSC016I Attempting to find SID for local user [PSM-8D10000000000000]

Profile Ignored (In Use):

[26/11/2025 | 02:51:08.810481] | {pid=7208} | {tid=3044} | class CPSMPeriodicWorkJob * | PSM\PSMServer\PSMPeriodicWorkJob.cpp(309) | :: | PSMSR1340W The profile of shadow user [PSM-620F000000000000] is in use and will be ignored

Cleanup Completed:

[26/11/2025 | 02:51:08.889866] | {pid=7208} | {tid=3044} | class CPSMPeriodicWorkJob * | PSM\PSMServer\PSMPeriodicWorkJob.cpp(335) | :: | PSMSR1344I Finished clearing Shadow users profiles.

# You can also make use of the PSMChecker Tool to delete excess Shadow User accounts on demand.
https://community.cyberark.com/s/article/PSMChecker-Tool-User-Guide


Actions
  • Print
  • Copy Link

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