today I faced an issue with Terminal Server Licensing problem. It was not possible to start its service.
It failed with:
The following error occurred:Can’t initialize Cryptographic – error code 5
An error occurred during the Terminal Services license server initialization phase
The terminal Services licensing service terminated with service-specific error 3221295105 (0xC0011001)
After googling a bit I found out that it is about permissions to folder
C:\Users\all users\Application Data\Microsoft\Crypto\RSA\MachineKeys (in my case it was windows 2008, for windows 2003 path is different)
So it was necessary to grant read permissions for “Network Service” account to this folder and files inside. Unfortunately inheritance is broken for files inside of folder and I did not had any permissions for them. I used “takeown” tool to get necessary permissions
takeown /F “C:\Users\all users\Application Data\Microsoft\Crypto\RSA\MachineKeys” /A /R /D Y
/F specifies folder or file
/A key sets owner to be local administrators group, ofc you need to be a member of this group
/R is necessary to operate on files and subfolders of specified directory
/D Y used to disable popup warnings
Afterwards I navigated to “MachineKeys” folder properties > “Security” tab > “Advanced” button > “Edit” button > “Add” button. Type “Network Service” as service name. Choose permissions as specified on picture and make sure “Apply to” is set to be same as on a picture below.
Now you will be able to launch Terminal Server Licensing service without any troubles. Files for this service are located under C:\Windows\system32\LServer, so if you need backup it is enough to copy this folder.
# Can’t initialize Cryptographic #3221295105 #0xC0011001 #Terminal Services licensing service #Cryptographic – error code 5