Open laozc opened 3 months ago
The code referred below tries to create a user logon session with LOGON32_LOGON_BATCH type. https://github.com/cloudbase/cloudbase-init/blob/4bb6895f115c8cb20ee9be37d5facc84243d0113/cloudbaseinit/init.py#L160-L162
However, the installer script granted the SeBatchLogonRight right for the created user. Only SeServiceLogonRight is granted by default. https://github.com/cloudbase/cloudbase-init-installer/blob/a19436cf78d6add1b25a4a21d6141320b31a5f93/CloudbaseInitSetup/Carbon/Service/Install-Service.ps1#L194 Grant-Privilege -Identity $identity -Privilege SeServiceLogonRight
It doesn't seem to result in any logon error with LOGON32_LOGON_BATCH type. Not sure if it was on purpose to use LOGON32_LOGON_BATCH other than LOGON32_LOGON_SERVICE.
The code referred below tries to create a user logon session with LOGON32_LOGON_BATCH type. https://github.com/cloudbase/cloudbase-init/blob/4bb6895f115c8cb20ee9be37d5facc84243d0113/cloudbaseinit/init.py#L160-L162
However, the installer script granted the SeBatchLogonRight right for the created user. Only SeServiceLogonRight is granted by default. https://github.com/cloudbase/cloudbase-init-installer/blob/a19436cf78d6add1b25a4a21d6141320b31a5f93/CloudbaseInitSetup/Carbon/Service/Install-Service.ps1#L194 Grant-Privilege -Identity $identity -Privilege SeServiceLogonRight
It doesn't seem to result in any logon error with LOGON32_LOGON_BATCH type. Not sure if it was on purpose to use LOGON32_LOGON_BATCH other than LOGON32_LOGON_SERVICE.