Local Security Policy

Also known as: secpol.msc

On this page 7

Local Security Policy is the Microsoft Windows administrative console, opened with secpol.msc, that configures the security settings of a single computer, including password rules, account lockout, audit policy, user rights and hundreds of security options. It is a focused view of the security portion of the local Group Policy object, presented as a snap-in for the Microsoft Management Console.

In Windows administration, the tool matters most on standalone and workgroup devices, where no domain controller distributes policy. On domain-joined machines it still shows local values, but domain Group Policy overrides any conflicting local setting, which is a frequent source of confusion.

How Local Security Policy applies settings

Local Security Policy works by writing values into the local security database and related registry locations, which the Security Configuration Engine then enforces. Changes made in the console usually take effect at the next policy refresh, and running gpupdate /force or restarting applies them immediately.

The console is available in the Pro, Enterprise and Education editions of Windows and in Windows Server. Windows Home editions do not include secpol.msc, so those devices rely on Windows Settings, account tools or the command line for comparable changes.

Policy precedence follows the LSDOU order: local policy first, then site, domain and organizational unit policies. A later layer overwrites an earlier one where they conflict, so the local layer has the lowest priority on a domain-joined computer.

Policy layerApplied byPriority if settings conflict
Local policyThe computer itselfLowest
Site policyActive Directory site linkOverrides local
Domain policyDomain-linked GPOOverrides site
Organizational unit policyOU-linked GPOHighest by default
Where Local Security Policy fits in the policy order

Main areas of Local Security Policy

The console is organized into policy nodes, each covering one family of controls. Administrators spend most of their time in Account Policies and Local Policies, but the other nodes control firewall, certificate and application rules.

The following table shows the principal nodes and what each one governs.

NodeWhat it controlsExample setting
Account PoliciesPasswords and lockoutMinimum password length
Local PoliciesAuditing, rights and optionsDeny log on locally
Windows Defender Firewall with Advanced SecurityInbound and outbound rulesBlock a port
Public Key PoliciesCertificates and EFSData recovery agent
Software Restriction PoliciesLegacy executable controlDisallow a path
Application Control PoliciesAppLocker rulesAllow signed apps only
Advanced Audit Policy ConfigurationGranular audit categoriesAudit logon events
Principal nodes in secpol.msc

Within Local Policies, User Rights Assignment decides which accounts may perform privileged actions, such as logging on through Remote Desktop Protocol or shutting down the system. Security Options holds individual switches, for example interactive logon messages, User Account Control behavior and SMB signing requirements.

Local Security Policy is one of several ways to configure Windows security, and choosing the right tool depends on scale and management model. It edits only security settings on one machine, while neighboring tools cover broader scopes.

This comparison shows how secpol.msc relates to other administrative tools.

ToolScopeBest suited for
Local Security PolicySecurity settings, one computerStandalone hardening
Local Group Policy EditorAll local policy, one computerAdministrative templates too
Group PolicyDomain computers and usersActive Directory fleets
Microsoft IntuneCloud-managed devicesMicrosoft Entra ID environments
secedit commandTemplates via command lineScripting and export
Local Security Policy and neighboring tools

The Local Group Policy Editor, gpedit.msc, contains the same security settings under Computer Configuration, Windows Settings, Security Settings. Local Security Policy simply presents that branch alone, which makes it quicker for security-only work.

Practical configuration and auditing

In practice, administrators use Local Security Policy to harden individual systems, test settings before rolling them out by Group Policy, and verify what a device is actually enforcing. Good practice is to document every change and keep an exported baseline.

The following decision table matches common tasks with a suitable approach.

TaskRecommended approachReason
Harden one workgroup serverEdit secpol.msc directlyNo domain to apply GPOs
Copy settings to many machinesExport with secedit /exportRepeatable template
Apply a Microsoft baselineSecurity Compliance Toolkit with LGPOTested settings
Check effective settingsgpresult /h reportShows winning policy
Compare against a templateSecurity Configuration and AnalysisHighlights differences
Common tasks and recommended approaches

Typical hardening values include a minimum password length of 14 characters or more for local accounts, an account lockout threshold that slows guessing attacks, and removal of unnecessary logon rights. Recent Windows 11 builds already apply a default lockout threshold of 10 invalid attempts, so administrators should review defaults before changing them.

Limitations and common mistakes

The most common mistake is expecting a local change to win on a domain-joined computer. If a domain GPO defines the same setting, the console may show a value that the device does not enforce, or the field may appear unavailable.

  • Domain account policies come from the domain: password and lockout rules for domain accounts are set by domain-level policy, not by local policy on member computers.
  • Overly strict user rights can lock administrators out: removing Administrators from logon rights may require recovery from offline media.
  • Audit settings can conflict: mixing basic Audit Policy with Advanced Audit Policy Configuration produces unpredictable results unless the override option is set.
  • Undocumented changes are hard to reverse: export the configuration with secedit before major edits.
  • Home editions lack the console: instructions written for secpol.msc do not apply to Windows Home.

The idea in brief

Local Security Policy is a control panel for the security rules of one Windows computer. It decides things such as how long passwords must be, how many wrong guesses are allowed before an account is locked, and who is allowed to sign in remotely.

Think of it as the house rules for a single building. If the building belongs to a larger organization, the head office rules (domain policy) take priority over the local ones.

A practical scenario

A small architecture practice runs a single Windows Server file server in a workgroup, without Active Directory. After a security review, the office administrator opens secpol.msc and sets a minimum password length of 14 characters, an account lockout threshold of 10 attempts with a 15-minute lockout, and auditing of failed logon events.

Under User Rights Assignment, the administrator limits Remote Desktop logon to a dedicated administrative group and removes the standard Users group. The configuration is then exported with secedit /export and stored with the network documentation.

Two months later, Event Viewer shows repeated failed logons from an old laptop with a saved outdated password. The lockout policy stops the repeated attempts after ten failures, the administrator traces the source quickly, and the exported template allows the same settings to be applied to a replacement server in minutes.