Deny log on locally
- Windows 11
- Windows 10
Describes the best practices, location, values, policy management, and security considerations for the Deny log on locally security policy setting.
This policy setting determines which users are prevented from logging on directly at the device's console.
- User-defined list of accounts
- Not defined
- Assign the Deny log on locally user right to the local guest account to restrict access by potentially unauthorized users.
- Test your modifications to this policy setting in conjunction with the Allow log on locally policy setting to determine if the user account is subject to both policies.
Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment
The following table lists the actual and effective default policy values for the most recent supported versions of Windows. Default values are also listed on the policy’s property page.
|Server type or GPO
|Default Domain Policy
|Default Domain Controller Policy
|Stand-Alone Server Default Settings
|Domain Controller Effective Default Settings
|Member Server Effective Default Settings
|Client Computer Effective Default Settings
This section describes features, tools, and guidance to help you manage this policy.
A restart of the device isn't required for this policy setting to be effective.
Any change to the user rights assignment for an account becomes effective the next time the owner of the account logs on.
If you apply this policy setting to the Everyone group, no one will be able to sign in locally.
This policy setting supersedes the Allow log on locally policy setting if a user account is subject to both policies.
Settings are applied in the following order through a Group Policy Object (GPO), which will overwrite settings on the local computer at the next Group Policy update:
- Local policy settings
- Site policy settings
- Domain policy settings
- OU policy settings
When a local setting is greyed out, it indicates that a GPO currently controls that setting.
This section describes how an attacker might exploit a feature or its configuration, how to implement the countermeasure, and the possible negative consequences of countermeasure implementation.
Any account with the ability to sign in locally could be used to sign in at the console of the device. If this user right isn't restricted to legitimate users who must sign in to the console of the device, unauthorized users might download and run malicious software that elevates their user rights.
Assign the Deny log on locally user right to the local Guest account. If you have installed optional components such as ASP.NET, you may want to assign this user right to other accounts that are required by those components.
If you assign the Deny log on locally user right to other accounts, you could limit the abilities of users who are assigned to specific roles in your environment. However, this user right should explicitly be assigned to the ASPNET account on devices that are configured with the Web Server role. You should confirm that delegated activities aren't adversely affected.