One of the biggest problem in Application or Desktop Virtualization is end user experience and consistency of user profile and customizations. Luckily there is a bunch of tools available on the market that help solve that problem. One of them is Citrix Profile Management intended as a profile solution for XenApp servers, virtual desktops created with XenDesktop, and physical desktops. You install Profile management on each computer whose profiles you want to manage. Active Directory Group Policy Objects allow you to control how Citrix user profiles behave. All sounds like a fairy tail – Citrix admin configures policy settings and it everything works like a charm. But obviously it isn’t. Recently I needed to troubleshoot user Citrix profile related problem, or at least user stated that I’ve started from checking Active Directory Group Policy settings for Citrix Profile Management. Everything looked good, user was member of a proper security group. I switched then to the user store defined in Group Policy to check if I can find anything there. Usually you held use store on network share on file server. It might be part of user homedir or might be completely separate folder. After getting to user store you find the below structure of files and folders.
Add caption |
I was searching Citrix eDocs trying to find explanation of that structure and especially those configuration files but I was unsuccessful. So what does they really do? Let’s start from .INI files. Below you can find information stored in my Citrix profile:
PmCompatibility.ini
You can find here two interesting information helpful in troubleshooting:
[VersionUpdateTimeStamps] – first part of that string tells you which version of Citrix UPM was used and the second part tells you when logged off last time from Citrix session using profile management. In my case I used UPM version 5.1 and I logged of 18th August at 19:20.
[LastUpdateServerName] – one more time, first part tells you which version of Citrix UPM was used and the second part tells you to which Citrix XenApp/XenDesktop server you were connected.
UPMSettings.ini
I haven’t paste whole file here. Basically it contains configuration of UPM. It is synced every time you log to Citrix session and it reflects settings in Active Directory Group Policy for Citrix Profile Management – or at least it should
UserProfileOrigin.ini
OPTemplate – it tells you from what kind of profile your Citrix profile was created. In that particular case I was launching Citrix session in the environment where Citrix Profile Management was configured. So my profile was created from Default user profile on server PSXA01. But if I would have already some existing/local profile on XenApp/XenDesktop server that string would be like: C:\Users\PawelSerwan. It would be the same if you would change version of Citrix Profile Management.
UTCTime – shows when Citrix user profile was created
Conflict Flags – shows if there were some conflicts between profiles – I was not able to find info what exact conflicts count here.
Machine Name – tells you to which server user was connected when Citrix profile was created.
Machine Domain – shows domain name which server is member of.
Now let’s check what directories contain.
Pending
1. UPM_Profile – contains configuration, settings and data changed in current Citrix session/sessions. Those changes will be later incorporated into user Citrix profile.
2. Stamp – it contains one file with name of the server to which user Citrix profile was copied locally.
Stamp subfolder
UPM_Profile
UPM_Profile folder contains all data, settings and configuration that were defined in Active Directory Group Policy for Citrix Profile Management. This folder simply contains Citrix profile.
Hope that this short explanation of directories and files sitting inside UPM user store will be useful for you and will ease your troubleshooting of Profile Management problems.
User Profile Service Failed the Logon
User Profile Service Failed the Logon
When Windows cannot even create a temporary profile you get to see the following error message:
The User Profile Service failed the logon. User profile cannot be loaded.
This typically happens when the default profile, stored in C:\Users\Default, has incorrect permissions or is corrupt in some way.
Default Profile Permissions
If all is well, the directory C:\Users\Default inherits permissions from its parent folder, C:\Users. This results in SYSTEM and Admninistrators having full control, while Users and Everyone have read permissions. In SetACL Studio this looks as follows:
The permissions for SYSTEM and Administrators are not relevant, but if for some reason the user logging on does not have read permissions on C:\Users\Default the error message User Profile Service Failed the Logon will be displayed and logging on is not possible.
When this happens the user profile service logs an event with ID 1509 and source User Profile General in the application event log:
Default Profile Corrupt
Logon is not possible, either, if the default profile’s NTUSER.DAT file is nonexistent or corrupt.
If NTUSER.DAT does not exist the user profile service logs an event with ID 1500 and source User Profile Service in the application event log:
If, on the other hand, NTUSER.DAT is corrupt the user profile service logs an event with ID 1508 and source User Profile Service in the application event log:
Fixing a Corrupt Default Profile
The easiest way to fix a corrupt default profile is to delete the content of C:\Users\Default and copy it from a working system. Make sure, though, that the machine you copy from has the same operating system version and language.
Users only get a temp profile in Citrix
New users when logging into Citrix XenApp are only able to get a temp profile. Existing users have working profiles, If we delete existing profiles and login again, user only gets temp profile. It is not corrupt profiles.
The Profile List is located here: HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList
NT\CurrentVersion\ProfileList
Delete any entries that end in .bak from this list
The Default User profile on the server is corrupt or missing. Simply copy the default user profile over from one of the other Citrix Servers to the problem server via UNC path: \\servername\users\default user or whatever copy method floats your boat.
I recommend disabling logins and reconnections to this Citrix Server before completing this and rebooting after the profile is copied over and the .bak GUIDs removed from the profile list.
Once the server is back up you should be all set.
I recommend disabling logins and reconnections to this Citrix Server before completing this and rebooting after the profile is copied over and the .bak GUIDs removed from the profile list.
Once the server is back up you should be all set.
Description
We had a long running issue that Citrix users would randomly get a temporary profile when logging in. I wrote the below script to connect to the registry on the citrix servers and find (delete) temporary profiles.