4sysops

  • PowerShell Wiki
  • IT Administration Forum
  • PowerShell Forum
  • Community Forum
  • Site-Wide Activity
  • PowerShell Group
  • Earning as 4sysops member
  • Member Ranks
  • Member Leaderboard – This Month
  • Member Leaderboard – This Year
  • Member Leaderboard – All-time
  • Author Leaderboard – Last 30 Days
  • Author Leaderboard – This Year
  • Cloud Computing
  • Write for 4sysops
  • Security options in Windows Server 2016: Accounts and UAC

4sysops - The online community for SysAdmins and DevOps

' src=

Interactive logon

User account control.

' src=

Security policy settings control various aspects of system protection, as explained in my post User rights assignment in Windows Server 2016 . Settings available in Security Options allow you to configure things related to user accounts, interactive logon, network access, network security, and the UAC feature. Today, I will cover settings related to interactive user behavior and built-in accounts. You should add these to your security baseline group policies and apply them on all computers.

Each setting uses the following format:

Name of the setting —Recommended value or values

The built-in Administrator account is often a target of attackers because it is a well-known account with complete control of the system. Furthermore, the account lockout policy does not apply to this account, so brute-force attacks will not lock it. Despite the fact you can rename the account with the Accounts: Rename administrator account setting, the recommended approach is to disable this account. Enumerating user account names is one of the first steps attackers undertake.

Note that in case of issues like a broken domain trust, you will need to reboot the system to safe mode, where the account is always enabled, or have another local account with administrator privileges available.

Accounts: Block Microsoft accounts —Users can't add or log on with Microsoft accounts

Users should be able to use only accounts your organization provides. This option will prevent access to Microsoft online accounts.

Accounts: Guest account status —Disabled

Even though the Guest account has no rights by default, it is a best practice to disable it completely and rename it with the Accounts: Rename guest account option.

TIP: Renaming the Guest account to Administrator is a good trick on attackers—they think they are trying to hack the Administrator account, but in reality, they are hacking an account with no permissions. This may slow down an attack.

Accounts: Limit local account use of blank passwords to console logon only —Enabled

There may be some leftover local accounts with no passwords, which is far from secure. Enabling this setting ensures no one can use such accounts for Remote Desktop Protocol (RDP) connections or network access to a share. Physical access to the keyboard (or VMware console) is required to use such accounts.

Settings related to built in accounts

Settings related to built in accounts

Interactive logon: Do not display last user name —Disabled

Normally, when Windows boots up, it shows the username of the last logged-on user. The username is sensitive information. An attacker could use it to discover your naming convention and then guess other usernames.

Interactive logon: Do not require CTRL+ALT+DEL —Disabled

This well-known key combination prevents exploits that present users with a fake logon screen, capturing entered credentials.

Interactive logon: Number of previous logons to cache (in case domain controller is not available) —2

Cached logons are stored on the local filesystem. If an attacker gains access to the filesystem, he can also find these cached logons. It is not very common that a domain-joined server can't reach domain controllers to authenticate a user.

Interactive logon: Require Domain Controller authentication to unlock workstation —Enabled

Enabling this setting ensures that changes to user accounts apply to users already logged on. For example, disabling a user account means no one can use it any longer to unlock a previously logged-on session. If you are working offline, this setting is not applied.

User Account Control: Admin Approval Mode for the Built-in Administrator account —Enabled

User Account Control: Run all administrators in Admin Approval Mode —Enabled

These two settings control whether UAC is enabled or not. By default, the first option is set to disabled; if you are logged on as Administrator, everything is running with elevated privileges. It is a best practice to enable UAC for the Administrator account also.

User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode —Prompt for consent on the secure desktop

User Account Control: Switch to the secure desktop when prompting for elevation —Enabled

User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop —Disabled

Configuring all three settings as above ensures that the system will always switch to the secure desktop (a dimmed screen with a prompt). Malware can spoof a standard elevation prompt—once you enter your elevated credentials, the attacker has them.

Secure desktop prompt

Secure desktop prompt

User Account Control: Detect application installations and prompt for elevation —Enabled

Some malware may look like a trusted program. When you permit it, it will try to install the malicious code. Enabling this setting will display another prompt, allowing you to mitigate damage.

User Account Control: Behavior of the elevation prompt for standard users —Automatically deny elevation requests

Subscribe to 4sysops newsletter!

Error message for a standard user

Error message for a standard user

As you can see, many security settings are available in Windows Server 2016. A clean installation leaves many of them not configured for high security. I highly recommend changing them, especially those related to built-in accounts and the UAC feature. By doing so, you are making your server more secure.

avatar

Want to write for 4sysops? We are looking for new authors.

4sysops members can earn and read without ads!

User cant login because logon hours resitriction

Restrict logon time for Active Directory users

' src=

Show or hide users on the logon screen with Group Policy

' src=

Manage BitLocker centrally with AppTec360 EMM

' src=

Local password manager with Bitwarden unified

' src=

Recommended security settings and new group policies for Microsoft Edge (from 107 on)

Save the BitLocker key to the Microsoft account retrospectively

Save and access the BitLocker recovery key in the Microsoft account

Launching the PC Manager utility in Windows 11

Manage Windows security and optimization features with Microsoft’s free PC Manager

Enabling Windows Extended Protection in IIS

IIS and Exchange Server security with Windows Extended Protection (WEP)

Enable certificate templates on the new server

Remove an old Windows certificate authority

Filtering the event log to view only lockout events

Find the source of AD account lockouts

' src=

Unlock AD accounts with PowerShell

The default Microsoft Editor provides correction help from the cloud the simple mode works locally

Privacy: Disable cloud-based spell checker in Google Chrome and Microsoft Edge

PSLoggedOn command line options

PsLoggedOn: View logged-on users in Windows

Defining allowed applications via a Group Policy

Controlled folder access: Configure ransomware protection with Group Policy and PowerShell

Password reset and unlock account integration at Windows logon

Self-service password reset with ManageEngine ADSelfService Plus

Document status of msDS SupportedEncryptionTypes for all accounts

Find Active Directory accounts configured for DES and RC4 Kerberos encryption

PsList filtering examples

List Windows processes with PsList

Smart App Control requires reinstalling Windows if it is turned off featured

Smart App Control: Protect Windows 11 against ransomware

Option to use encrypt email may be missing in Outlook

Encrypt email in Outlook with Microsoft 365

' src=

Split-brain DNS deployment using Windows Server DNS policy

Leave a reply click here to cancel the reply.

Please enclose code in pre tags

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Receive new post notifications

Twitter

Subscribe to Newsletter

Follow 4sysops.

Please ask IT administration questions in the forums . Any other messages are welcome.

Log in with your credentials

or      Create an account

Forgot your details?

Create account.

Receive news updates via email from this site

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

How to grant users rights to manage services

This article describes how to grant users rights to manage services.

Applies to:   Windows Server 2003 Original KB number:   325349

This article describes how to grant users the authority to manage system services in Windows Server 2003.

By default, only members of the Administrators group can start, stop, pause, resume, or restart a service. This article describes methods that you can use to grant the appropriate rights to users to manage services.

Method 1: Use Group Policy

You can use Group Policy to change permissions on system services. For additional information, click the following article number to view the article in the Microsoft Knowledge Base: 324802 HOW TO: Configure Group Policies to Set Security for System Services in Windows Server 2003

Method 2: Use Security Templates

To use security templates to change permissions on system services, create a security template following these steps:

Click Start , click Run , type mmc in the Open box, and then click OK .

On the File menu, click Add/Remove Snap-in .

Click Add , click Security Configuration and Analysis , click Add , click Close , and then click OK .

In the console tree, right-click Security Configuration and Analysis , and then click Open Database .

Specify a name and location for the database, and then click Open .

In the Import Template dialog box that appears, click the security template that you want to import, and then click Open .

In the console tree, right-click Security Configuration and Analysis , and then click Analyze Computer Now .

In the Perform Analysis dialog box that appears, accept the default path for the log file that is displayed in the Error log file path box or specify the location that you want, and then click OK .

After the analysis is complete, configure the service permissions as follows:

To apply the new security settings to the local computer, right-click Security Configuration and Analysis , and then click Configure Computer Now .

You can use also the Secedit command-line tool to configure and analyze system security. For more information about Secedit, click Start , and then click Run . Type cmd in the Open box, and then click OK . At the command prompt, type secedit /? , and then press ENTER. Note that when you use this method to apply settings, all the settings in the template are reapplied, and this may override other previously configured file, registry, or service permissions.

Method 3: Use Subinacl.exe

The final method for assigning rights to manage services involves the use of the Subinacl.exe utility from the Windows 2000 Resource Kit. The syntax is as follows:

SUBINACL /SERVICE \\MachineName\ServiceName /GRANT=[DomainName]UserName[=Access]

The user who runs this command must have administrator rights for it to complete successfully.

If MachineName is omitted, the local machine is assumed.

If DomainName is omitted, the local machine is searched for the account.

Although the syntax example indicates a user name, this will work for user groups too.

The values that Access can take are as follows:

F : Full Control R : Generic Read W : Generic Write X : Generic eXecute L : Read controL Q : Query Service Configuration S : Query Service Status E : Enumerate Dependent Services C : Service Change Configuration T : Start Service O : Stop Service P : Pause/Continue Service I : Interrogate Service U : Service User-Defined Control Commands

If Access is omitted, "F (Full Control)" is assumed.

Subinacl supports similar functionality in relation to files, folders, and registry keys. For more information, see the Windows 2000 Resource Kit .

Automating Multiple Changes

With Subinacl, there is no option that you can specify that will set the required access for all services on a particular computer. However, the following sample script demonstrates one way that Method 3 can be extended to automate the task:

Save the script as a .vbs file, such as "Services.vbs," and call it as follows:

CSRIPT Services.vbs DomainName ComputerName UserName Access

Comment out or remove the line 'Wscript.Echo ...' if no feedback is required.

This sample does no error checking; therefore, use it carefully.

The Windows 2000 Resource Kit documentation mentions another utility (svcacls.exe) that performs the same service management rights manipulation as Subinacl. This is a documentation error.

Was this page helpful?

Additional resources

Related Sites

Certifications

Other resources

Support options

More support

Not an IT pro?

Cannot modify User Rights Assignment wthin the local security policy on a Server 2016 server (Datacenter)

I try to assign Debug programs to some account (by running secpol.msc), but Add User or Group button is disabled, and it says:

"This setting is not compatible with computers running Windows 2000 Service Pack 1 or earlier.  Apply Group Policy Objects containing this setting only to computers running a later version of the operating system."

All replies

As far as the warning goes it is a standard warning that you're about to push out a policy that may not affect  some  of your domain members.

However the point is you are trying to edit a local security policy. And you cannot edit this User Rights Assignment policy because this setting is being managed by a domain-based Group Policy. In this case, the domain Group Policy setting has precedence and you are prevented from modifying the policy via Local Group Policy.

To modify this policy, either:

Group policy objects (GPO) – Used in Active Directory domains to configure and regularly reapply security settings to multiple computers.

Local security policy (secpol.msc) – Used to configure a single (local) computer. Note that this is a one-time action. If another administrator changes these settings, you will need to manually change them back to the required state.

Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

sorry for late. I just have time to working on this. I know the polocy is controlled by Domain Controller now.

I use LsaAddAccountRights to add rights and LsaEnumerateAccountRights to enumerate rights, but it seems only work for local rights. I'm looking for a way to find the actually effective permissions for a user by API.

user rights assignment in windows server 2016

UCF STIG Viewer Logo

The Allow log on locally user right must only be assigned to the Administrators group.

Add User or Group button is grayed out in User Rights Assignment

Add User or Group button is grayed out in User Rights Assignment

Logon failure: The user has not been granted the requested logon type at this computer

1] Modify default Domain Controller Policy setting

2] enable add user or group button in user rights assignment, what are some of the settings available in the user rights assignment, how do i add a user to logon locally, where are user rights assignments stored.

You can configure the User Rights Assignment settings in the following location within the Group Policy Management Console (GPMC) under Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment , or on the local device by using the Local Group Policy Editor (gpedit. msc).

user rights assignment in windows server 2016

[email protected]

Stack Exchange Network

Stack Exchange network consists of 181 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Users have full control, but gets "you need permission.." errors

Windows Server 2016 Standard... department/group's users were getting read permission errors within their department folder, gave them full control on folder and subs, then they got write permissions error ("You require permission from ZPICTURES\admin-zp to make changes to this file"), then gave each user in group full control of folder and subs, but still getting the same error message when trying to write or modify anywhere within ("You require permission from...").

I'm really confused now as this configuration works on another group's folder (actually, with just full control to group instead of all users). How do I fix this group's permission configuration so the group's users have write permissions?

crashintoty's user avatar

2 Answers 2

JBaldridge's user avatar

You were already introduced to the main concepts of NTFS permissions in the answer by @JBaldridge above which haven't changed much since early days on NTFS/Windows server. I would only add a few things:

And last but not least make use of Effective Access to verify what level of access specific user or group have. It's available for you in Advanced Security Settings for folder, see picture below demonstrating UI of this feature (I guess picure should give you quite good understanding of what you can do with this feature):

enter image description here

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged permissions windows-server-2016 or ask your own question .

Hot Network Questions

user rights assignment in windows server 2016

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Powershell: Export User Rights Assignment

I'm new to PowerShell (PS). Currently I'm using windows server 2012 and I'm interested to know whether there is any way to export User Rights Assignment into a txt file. I tried

The above should should export it.

So, I get this: Current Output . Is there any way to export User Rights Assignment and make it look like (even with using batch files): Expected Output .

P.S Is There anyway to output those values in console? So i would be enable to redirect them to a txt file.

jonjoli's user avatar

3 Answers 3

Here's a PowerShell script that outputs usable objects with translated names and SIDs:

Bill_Stewart's user avatar

in addition to Eric's change i also needed to add a try catch to one of the functions in Bill_Stewart's post. if the SID being translated is from an object that no longer exists this will return the SID instead of sending an error for translate.

Ryan Reed's user avatar

Great script overall. Thank you for your efforts. One change I needed to make however to get it to output all principals assigned a right was to change the regex to '^(Se\S+) = (.+)' so that principals that were already resolved with a space in the name such as 'Domain users' were matched. Before that it would just report 'Domain.'

To save the output to a file, add a >> filename after the closing bracket of the last foreach-object Ex: } } >> 'outFile.txt'

or to output as delimited file (e.g., csv) use the following:

} | convertto-csv -delimiter '~' -notypeinformation >> 'outFile.txt'

Hope this helps.

Eric Alexander's user avatar

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged windows shell powershell batch-file or ask your own question .

Hot Network Questions

user rights assignment in windows server 2016

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

Managing “Logon As a Service” Permissions Using Group Policy or PowerShell

In Windows, you can use the “ Log on as a service ” Group Policy option to allow services to run under user accounts, and not in the context of a Local System, Local Service, or Network Service.

This policy allows certain accounts to start a process as a Windows service on behalf of a user. When this process starts, it is registered as a service.

The “Log on as a service” user right allows to start Windows network services that run continuously on the computer under the user account, even if no one is logged into the console of the computer (server). Also, this method allows you to safely start third-party services for which you don’t want to grant Local System privileges. It is much safer to run third-party services on behalf of non-admin user. The risk of using service accounts to run services is reduced because only local users with administrator permissions can install and configure Windows services.

Enable Logon as a Service Group Policy Option

Run the local (gpedit.msc) or domain (gpmc.msc) Group Policy Editor and go to the following GPO section: Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment. Find the Log on as a service policy.

Note that in Windows Server 2022, 2019, 2016, and Windows 10, the “NT SERVICE\ALL SERVICES” group is added to this policy by default.

When installing the Hyper-V role in Windows , the “NT VIRTUAL MACHINES\Virtual Machines” group (SID S-1-5-83-0) is additionally added. When installing web server IIS with the .NET Framework, then the IIS APPPOOL.NET v4.5 account is added.

Installing the IIS Web Server with .NET Framework adds the “IIS APPPOOL\.NET v4.5” and “IIS APPOOL\DefaultAppPool” accounts.

logon as a service gpo

Hint . You can also change the local Logon as a service policy through Local Security Policy console. To do this, open the Windows Control Panel > Local Security Policy > Security Settings > Local Policies > User Rights Assignments (or run the secpol.msc command) and modify the policy.

Double-click on the Logon as a service policy, click the Add User or Group button and specify the account or group to which you want to grant the permissions to run Windows services.

log on as a service gpo

To apply the new settings, run the gpupdate command :

How to Start a Service Under a Specific Account?

Now you can start the service management console (services.msc), and try to configure the launch of any service from behalf of a user account: select service > Properties > Log on tab > Log on as > This account > select account and set a password.

A message appears:

The account .\admin has been granted the Log On As A Service right.

gpo logon as a service

When using this policy, make sure that the user or group is not added to another policy called “ Deny log on as a service ”. In this policy, you can specify which user accounts are not allowed to run services. If the user is simultaneously added to the “Deny log on as a service” and “ Logon as a service” policies, the deny policy will take precedence. Those, when the service starts, a message appears:

Services Windows could not start the xxxx service on Local Computer.Error 1069: The service did not start due to a logon failure.

gpo log on as a service

You can also change the account under which a particular service runs from the command line. You can activate this task using the built-in sc.exe console tool. To start the MyWallService service under the ca_srvsvc domain account, run the command:

* Where userpassword5 – is the service account password.

If you entered everything correctly, a message will appear:

[SC] ChangeServiceConfig SUCCESS.

logon as a service group policy

You can also use PowerShell to set user account credentials in service settings. In this example, we will use the Service Management API via WMI (only applies to Windows PowerShell 2.x – 5.1):

Note that WMI allows you to change the credentials to run a service remotely. Just replace [computername] with the name of the remote computer where you want to configure the service or use a dot (.) if you want to change the credentials on the local computer.

To remotely change only the password of the account under which the service is running, use the following PowerShell script:

The following UserAccountControl attributes are typically enabled for a service account in Active Directory:

group policy logon as a service

Hint . In modern versions of Windows Server in an Active Directory domain, it is preferable to use special types of service accounts: Managed Service Accounts ( MSA , object of type msDS-ManagedServiceAccount) or Group Managed Service Accounts ( gMSA , object of type msDS-GroupManagedServiceAccount). These are special types of AD objects created specifically to securely run system services, scripts, and scheduler jobs. For these service accounts, a complex password is generated in Active Directory and automatically changed every 30 days (by default). Such service accounts can independently change their passwords in Active Directory. In this case, the password is not stored on the local computer (cannot be retrieved from LSAS process), it cannot be used for interactive login, and the secure Kerberos protocol is used for authentication ( Getting Started with Group Managed Service Accounts ).

It is advisable to minimize the number of user accounts to which you grant the “Logon as a service” permissions. To minimize security risks, you should disable interactive and remote interactive sessions for service accounts. This is often described in best practices.

kardashevsky cyril

Cyril Kardashevsky

I enjoy technology and developing websites. Since 2012 I'm running a few of my own websites, and share useful content on gadgets, PC administration and website promotion.

Manage and Disable Windows Defender Using PowerShell

How to get user attributes from active directory, you may also like, how to get windows 10 user login history..., how to reset onedrive sync in windows, icacls: list and manage folder and file permissions..., how to fix user profile cannot be loaded..., get-service: checking windows services status with powershell, removing old and unused drivers from driver store..., how to delete swapfile.sys in windows 10/11, how to fix error 0x80070057, how to delete com port in use, using select-object cmdlet in powershell.

' src=

It should really be noted that by creating a GPO, all existing entries in the “Log on as a service” policy will get overwritten with whatever is in the group policy. If you have SQL servers, or other servers that use service accounts that have already installed software/apps, those will be removed in place of what is in your group policy.

' src=

Thank you. Literally NO ONE in Enterprise IT understands this about most of the stuff in the USer Rights Assignment of Group Policy. I’ve fixed so many outages due to admins settings this via GPO across many servers and overwriting what’s already set in there by x, y, z application that was installed who put accounts in there. Admins just blindly follow along application documentation or posts like this. I’m so tired of it.

– Angry Sr. Systems Admin LOL

' src=

Been like this for 20 years now.

Microsoft really needs to add switches for append, remove and replace for setting group policy objects, or just remove these from GPO management altogether as it’s half baked.

' src=

Please follow this up with how to set Logon As a Service for a user or group policy on Windows Server 2016 Core – there is no GUI, no control panel, no gpedit.msc, no gpmc.msc, no services.msc, etc etc.

For example, to setup Jenkins requires a user account with Logon As a Service enabled. Thank you

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed .

cropped Screenshot 2020 03 15 at 23.04.41

Learn [Solve IT]

Hands-on on Windows, macOS, Linux, Azure, GCP, AWS

How to configure log on as a batch job permissions on any server

Christian

Log on as a batch job. This security setting allows a user to be logged on by means of a batch-queue facility and is provided only for compatibility with older versions of Windows. For example, when a user submits a job by means of the task scheduler, the task scheduler logs that user on as a batch user rather than as an interactive user. Default: Administrators and Backup Operators. Please visit the following links for more on Group Policy Objects and GPO . To learn more about these switches, see “ All about GPUpdate Switches: GPUpdate vs GPUpdate /force “, what is Registry Editor and how to access the registry hives , and  how to search through Windows Registry , what is Registry Editor and how to access the registry hives  and how to search through Windows Registry .

To do this, search for the “secpol.msc” from the windows search as shown below, or alternatively, launch the run dialog wizard and enter “secpol.msc” and hit ok. Regardless of the step, you chose to use, this will open the Local Security Policy console. “

Note: You can also access this from the Group Policy Management Editor dialog box, under  Computer Configuration , expand  Policies, Windows Settings ,  Security Settings , and  Local Policies , and then click  User Rights Assignment

Screenshot-2021-03-16-at-22.03.58

Locate the  Local Policies , and then click  User Rights Assignment . On the right pane of the window, double-click on log on as a batch job

Screenshot-2021-03-16-at-22.06.08

This will open up the Log on as a batch job Properties window. Click on Add Users or Group as shown below.

Screenshot-2021-03-16-at-22.07.35

This will open up the wizard below to select users, computers, service accounts or groups. Since we are interested in adding an MBAM service account, when I am done, I will click on OK.

Screenshot-2021-03-16-at-22.14.53

As you can see, the service account has been added. Click on Ok to close this window.

Screenshot-2021-03-16-at-22.15.59

As you can see the policy has been configured and that is all that needs to be done.

Screenshot-2021-03-16-at-22.16.52

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Thank you for reading this post. Kindly share it with others.

guest

  Windows OS Hub / Windows 10 / Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

How to allow or prevent shutdown/reboot option in windows via gpo, allow remote shutdown/restart without admin permissions, disable (hide) shutdown or restart options from windows, how to find out who restarted/shutdown a windows server.

You can set the permissions to restart or shutdown Windows using the Shut down the system parameter in the GPO section Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment. This GPO option allows you to specify which locally logged-on users can shut down an operating system.

Please note that the default restart/shutdown permissions for desktop versions Windows 10/11 and Windows Server editions are different.

Open the Local Group Policy Editor ( gpedit.msc ) and navigate to the section specified above. As you can see, the members of local groups Administrators , Users and Backup Operators have the permissions to shutdown/reboot a computer running Windows 10 or 11 .

Shut down the system - allow user to shutdown/restart windows via gpo

On Windows Server 2022/2019/2016 , only Administrators or Backup Operators can shut down or restart the server. It is reasonable, since in most cases a non-admin user must not have the privileges to shutdown a server (even accidentally). Just imagine an RDS farm host that is often shuts down since users accidentally click on the “Shutdown” button in the Start menu…

On Active Directory domain controllers, the rights to shut down Windows are delegated to:

If the user does not have permissions to restart/shutdown the operating system, then an error will appear when running the following command:

shutdown –r –t 0

shutdown command - access is denied 5

You can manually grant permissions to shut down the computer locally using the legacy ntrights tool from the Windows Server 2003 Resource Kit:

ntrights +r SeShutdownPrivilege -u woshub\j.smith

To prevent user from shutting down or restarting Windows:

ntrights -r SeShutdownPrivilege -u woshub\j.smith

Or, vice versa, you can prevent users of workstations running the desktop Windows 10/11 edition from restarting the computer that performs some kind of server function. In this case, just remove Users group from the local policy Shut down the system .

In the same way, you can prevent (or allow) shutdown/reboot operations for non-admin users on all computers in a specific Organizational Unit (OU) of an Active Directory domain using a domain GPO.

create new gpo

gpo: allow shutdown windows for non administrator users

allow restart and shut down windows for non-admin in start menu

To do it, add a user account to the Force shutdown from a remote system Group Policy option in the same GPO section ( User Rights Assignment ).

By default, only administrators can shutdown/restart the server remotely. Add a user account to the policy.

gpo to allow remote windows restart: Force shutdown from a remote system

ntrights +r SeRemoteShutdownPrivilege -u woshub\j.smith

After that, the user will get the SeRemoteShutdown privilege and will be able to restart the server remotely using the command:

Or using the Restart-Computer PowerShell cmdlet:

Restart-Computer –ComputerName hamb-rds01 –Force

If WinRM (Windows Remote Management) is enabled on the remote computer, you can use WSman instead of WMI to connect:

Restart-Computer -ComputerName hamb-rds01 -Protocol WSMan

If the user does not have permission to connect to WMI namespace, an error will appear:

You can use Group Policy to hide the Shutdown, Restart, Sleep and Hibernate options from the sign-in screen and Start Menu. This GPO option is called Remove and Prevent Access to the Shut Down, Restart, Sleep, and Hibernate commands and is located under User Configuration -> Administrative Templates -> Start Menu and Taskbar

Group Policy: Remove and Prevent Access to the Shut Down, Restart, Sleep, and Hibernate commands - remove Options in Windows 10 Start Menu

After you enable this policy, a user will be able only to disconnect the current session or use the logoff command. The Shutdown, Sleep and Restart buttons will become unavailable.

start menu

You can use some registry tweaks to hide only a specific item from the Power/Shutdown menu in Windows. For example, you want to hide only the “Shut down” option in the Start menu, but keep “Restart”.

set HideShutDown via registry

REG ADD "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Start\HideShutDown" /v "value" /t REG_DWORD /d 1 /f

Or using PowerShell:

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\Start\HideShutDown" -Name "value" -Value 1

Also, you can hide other options in Start Menu and Windows sign-in screen:

Please note that in Windows Server 2019/2022, after assigning restart permission to a user, an error may appear:

You don’t have permission to shutdown or restart this computer.

In this case, you need to enable the UAC parameter “User Account Control: Run all administrators in Admin Approval Mode” in the GPO:

If you have granted permission to reboot a computer for a non-admin user, you may want to know who restarted a Windows Server : a user or one of the administrators.

Use the Event Viewer ( eventvwr.msc ) to search for shutdown logs in Windows. Go to Windows Logs -> System and filter the current log by the Event ID 1074 .

filte events by 1074 restart event id

As you can see, there are server restart events in the log in chronological order. The event description includes the restart time, the reason, and the user account that restarted the host.

EventID: 1074 The process C:\Windows\system32\shutdown.exe has initiated the restart of computer on behalf of user for the following reason: Reason Code: 0x800000ff Shutdown Type: restart

You can get information about recent Windows shutdown events using the same Event ID 1076 :

Use the following simple PowerShell script to list the last ten computer restart and shutdown events. This list contains the names of the users and processes from which the reboot was initiated.

Get-EventLog -LogName System | where {$_.EventId -eq 1074} |select-object -first 10 | ForEach-Object { $rv = New-Object PSObject | Select-Object Date, User, Action, process, Reason, ReasonCode if ($_.ReplacementStrings[4]) { $rv.Date = $_.TimeGenerated $rv.User = $_.ReplacementStrings[6] $rv.Process = $_.ReplacementStrings[0] $rv.Action = $_.ReplacementStrings[4] $rv.Reason = $_.ReplacementStrings[2] $rv } } | Select-Object Date, Action, Reason, User, Process |ft

powershell get shutdown history in windows events

Fix: Can’t Extend Volume in Windows

Fix: windows needs your current credentials pop-up message, related reading, clear cache and temp files in user profiles..., prevent users from creating new groups in microsoft..., internet time synchronization failed on windows, copy/paste not working in remote desktop (rdp) clipboard, how to disable ntlm authentication in windows domain.

' src=

So sad that there’s no option to disable only shutdown. I have a need to allow user to restart their machines but not shutdown.

' src=

FYI you can hide shutdown from the start menu using HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\Start\HideShutDown

Thanks, but even so an advanced user would know to turn it off using other ways.

' src=

Thank you MT.. this helped..

' src=

On Windows 11, this did work, however, a user who is blocked from restarting/shutting down in this way, can still press Control-Alt-Delete and has the restart/shutdown option in the lower right hand corner. Is there a way to remove that, too?

I just actually tried it from a “non-privileged” account. The good news is that although the options appear, they don’t actually work. 🙃

Leave a Comment Cancel Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Current [email protected] *

Leave this field empty

Stack Exchange Network

Stack Exchange network consists of 181 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Can't edit Local Security Policy

I'm trying to add users to the Access this computer from the network User Rights Assignment policy but the 'Add' button is disabled:

enter image description here

I'm connecting to the machine via RDP using the local Administrator account (not a domain user). I've also tried to do the same with a domain user that is in the Administrators group but the result is the same.

How can I add a user to this policy?

The machine is running Windows 7.

I say Reinstate Monica's user avatar

You cannot edit this User Rights Assignment policy because this setting is being managed by a domain-based Group Policy. In this case, the domain Group Policy setting has precedence and you are prevented from modifying the policy via Local Group Policy.

To modify this policy, either:

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged windows security remote-desktop administrator group-policy or ask your own question .

Hot Network Questions

user rights assignment in windows server 2016

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

user rights assignment in windows server 2016

The user rights that are required by Update.exe

Introduction.

Some Microsoft software updates use Update.exe as the Setup program. Update.exe version 5.4.1.0 and later versions require that the user who installs the software update is an administrator with certain user rights. This article lists those user rights requirements. If a user does not have the required user rights and tries to install a software update package that uses Update.exe, they may receive the following error message:

You do not have permission to update <OS name>. Please contact your system administrator.

If the software update installation was performed in unattended mode by specifying either the /quiet or /passive command-line switches, this error message is displayed in the installation log. By default, the installation log is located at %systemroot%/KB ###### .log, where ###### is the number of the Microsoft Knowledge Base article for the fix that was applied.

More Information

To determine whether a software update uses Update.exe as the Setup program for packages released after July 2004, examine the Installer Engine value on the Version tab of the Properties dialog box for the software update package. For packages released before July 2004, you must extract the package contents to determine which installer is used and what version it is. For additional information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:

832475 Description of the new features in the package installer for Windows software updates The following table lists the user rights required by Update.exe.

For additional information about earlier versions of Update.exe and Debug programs that require that administrators have rights, click the following article number to view the article in the Microsoft Knowledge Base:

830846 Windows Product Updates may stop responding or may use most or all the CPU resources To determine the missing user right, examine the installation log file. The installation log file contains the following similar error messages:

2.744: d:\aab949b8ae7e35434dde6b\update\update.exe (version X.X.X.X ) 2.744: Failed To Enable SE_SECURITY_PRIVILEGE 2.754: Setup encountered an error: You do not have permission to update OS_name . Please contact your system administrator. 2.764: You do not have permission to update OS_name .

Note OS_name represents the operating system name. SE_SECURITY_PRIVILEGE represents the missing user right. X.X.X.X represents the version number. To view and modify user rights, follow these steps:

Start the Group Policy Editor in either your local or your domain environment. For more information about how to do this, visit the following Microsoft Web site:

http://www.microsoft.com/windows/windows2000/en/advanced/help/gpedit_start.htm

Under Computer Configuration , click Windows Settings .

Click Security Settings , click Local Policies , and then click User Rights Assignments .

To assign the policies listed earlier, right-click the policy, click Properties , and then add the user.

Facebook

Need more help?

Want more options.

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

user rights assignment in windows server 2016

Microsoft 365 subscription benefits

user rights assignment in windows server 2016

Microsoft 365 training

user rights assignment in windows server 2016

Microsoft security

user rights assignment in windows server 2016

Accessibility center

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

user rights assignment in windows server 2016

Ask the Microsoft Community

user rights assignment in windows server 2016

Microsoft Tech Community

user rights assignment in windows server 2016

Windows Insiders

Microsoft 365 Insiders

Was this information helpful?

Thank you for your feedback.

user rights assignment in windows server 2016

¿No tiene una cuenta? Cree una .

Restablecer contraseña

How to define/grant the required user rights/permissions for a Backup Exec Service Account (BESA)

Description.

Backup Selection browse fails with error "Failure to browse server"

user rights assignment in windows server 2016

Error Message

Backup Selection browse fails with error "Failure to browse 'server'. Failed to log on to Microsoft Windows."

Connection with server failed. Hit <F5> to retry when trying to edit/create a backup job on Windows 2008 server

[ A ] The password set for the Backup Exec System Logon Account (Network -> Logon Accounts) or the Backup Exec Service Account (BESA) does not match to the password set in Active Directory or for the local administrator user account section. [ B ] If the BESA does not have the right to Logon as a batch job . By default this policy is applied to Administrators and the Backup Operators group. This user right is defined in the default Domain Controller's Group Policy object (GPO) and in the Local Security Policy of workstations & servers and it allows a user to be logged on by means of a batch-queue facility.   For more information on this user right, refer to:   http://technet.microsoft.com/en-us/library/cc780182(WS.10).aspx [ C ]  If the BESA is included in Deny logon as a batch job policy. 'Deny logon as a batch job' determines which accounts are prevented from being able to log on as a batch job. This policy setting supercedes the Log on as a batch job policy setting if a user account is subject to both policies. 

Solution  

Note : Backup Exec Service account can be set to a user with local administrator rights. 

For Windows 2016 / 2019

For Windows 2008 / 2008 R2 / 2012 / 2012 R2

For Windows 2003 / 2003 R2

For Windows 2016 / 2019 :

1. Go to Start | Programs | Administrative Tools | Group Policy Management .

2. From the left pane, expand Domains | Domain_Name | Group Policy Objects .

3. Right click on Default Domain Controllers Policy and click on Edit.

Ensure that the group policy being edited is set to Enforced or else the changes would not apply.

user rights assignment in windows server 2016

4. From the left pane, expand Computer Configuration and go to  Policies | Windows Settings | Security Settings | Local Policies | User Rights Assignments .

5. From the right pane, right-click Log on as a batch Job  --> Properties.

user rights assignment in windows server 2016

6. Click Add user or Group .

user rights assignment in windows server 2016

7. For the Add user or Group window, click Browse

user rights assignment in windows server 2016

8. Type the desired user account to act as your Backup Exec System Account, then click  Browse  and then click Ok .

user rights assignment in windows server 2016

9. Back in the "Group Policy Management Editor" note that your Backup Exec System Account now has " Log on as a batch Job " privilege.

10. Repeat steps 1 through 9 for any additional policies.  

[ C ]  Make sure the BESA is NOT included in the ' Deny Logon as a Batch' or 'Deny Logon as a service' because the deny supersedes the allow and even  adding the account under 'Logon as a Batch' or 'Logon as a service' would not resolve the issue.

user rights assignment in windows server 2016

Refresh the group policy Click Start > Run and type gpupdate /target: computer /force  ( this will force update the Group Policy ) 

For Windows 2008 / 2008 R2 / 2012 / 2012 R2 : 1. Go to Start | Programs | Administrative Tools | Group Policy Management. 2. From the left pane, expand Domains | Domain_Name | Group Policy Objects. 3. Right click on Default Domain Controllers Policy and click on Edit. 

user rights assignment in windows server 2016

5. From the right pane, right-click Create a token object.

user rights assignment in windows server 2016

6. Click " Add user or Group".

user rights assignment in windows server 2016

9. Back in the "Group Policy Management Editor" note that your Backup Exec System Account now has "Create a token object" privilege.

6. Repeat steps 1 through 9 for any additional policies.  

[ C ]  Make sure the BESA is NOT included in the ' Deny Logon as a Batch' or 'Deny Logon as a service' because the deny supersedes the allow and even  adding the account under 'Logon as a Batch' or 'Logon as a service' would not resolve the issue. ( Figure 4 )

user rights assignment in windows server 2016

[ D ] Make sure BESA has all the required permissions

1. Check the permissions for the Backup Exec System Account ( BESA ) which shows under Network -  Logon Accounts .  Make sure it is a member of the local administrator group (built in admins) if applicable, and/or domain admins.  Remove this account from any groups that do not have full administrative rights.  2. If performing the above steps do not resolve the issue, create a new user account in active directory and add it to the following groups only if a domain admin can be used else in case of a non DC a local user account part of the Local administrators group can also be used.

Then use this new account for Backup Exec services, add it under Network - Logon Accounts and make that as a default account. Note: This applies to Windows Server 2008/R2 (Domain controller and member servers) as well.   [ E ]  Make sure all Backup Exec services are started.

Artículos relacionados

¿fue útil este contenido.

Puntuación enviada. Proporcione comentarios adicionales (opcional)::

You are using Microsoft Internet Explorer!

Related articles, article languages.

user rights assignment in windows server 2016

Translated Content

Please note that this document is a translation from English, and may have been machine-translated. It is possible that updates have been made to the original version after this document was translated and published. Veritas does not guarantee the accuracy regarding the completeness of the translation. You may also refer to the English Version of this knowledge base article for up-to-date information.

IMAGES

  1. Change User Rights Assignment Security Policy Settings in Windows 10

    user rights assignment in windows server 2016

  2. User rights assignment in Windows Server 2016

    user rights assignment in windows server 2016

  3. Change User Rights Assignment Security Policy Settings in Windows 10

    user rights assignment in windows server 2016

  4. User rights assignment in Windows Server 2016

    user rights assignment in windows server 2016

  5. Change User Rights Assignment Security Policy Settings in Windows 10

    user rights assignment in windows server 2016

  6. Change User Rights Assignment Security Policy Settings in Windows 10

    user rights assignment in windows server 2016

VIDEO

  1. Add Users and Computers to Groups Windows Server 2008 R2

  2. how to add user in windows server 2012 R2

  3. Windows Server 2003 Active Directory Users and Computer Management

  4. Creating & Managing User Accounts Windows Server || Session 13 By Visualpath

  5. Microsoft Server 2012 R2 File Server Resource Configuration & User Policy Video Tutorial

  6. Create User Account on Server 2012

COMMENTS

  1. User rights assignment in Windows Server 2016

    User rights assignments are settings applied to the local device. They allow users to perform various system tasks, such as local logon, remote logon, accessing the server from network, shutting down the server, and so on. In this section, I will explain the most important settings and how they should be configured.

  2. Security options in Windows Server 2016: Accounts and UAC

    Security policy settings control various aspects of system protection, as explained in my post User rights assignment in Windows Server 2016. Settings available in Security Options allow you to configure things related to user accounts, interactive logon, network access, network security, and the UAC feature. Today, I will cover settings ...

  3. User Rights Assignment (Windows 10)

    You can configure the user rights assignment settings in the following location within the Group Policy Management Console (GPMC) under Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment, or on the local device by using the Local Group Policy Editor (gpedit.msc).

  4. Grant users rights to manage services

    To configure permissions for a new user or group, click Add. In the Select Users, Computers, or Groups dialog box, type the name of the user or group that you want to set permissions for, and then click OK. In the Permissions for User or Group list, configure the permissions that you want for the user or group.

  5. Cannot modify User Rights Assignment wthin the local security policy on

    I think we configure Computer Configuration ->Policies -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment->Debug programs on domain Group policy Object. We can try to logon this server to check which group policy object we configure this Debug programs. For computer configuration: 1.

  6. The Allow log on locally user right must only be assigned to the

    The Allow log on locally user right must only be assigned to the Administrators group. The Allow log on locally user right must only be assigned to the Administrators group. Overview Details

  7. Add User or Group button is grayed out in User Rights Assignment

    On a Domain Controller, click Start > Run.; Type gpmc.msc and hit Enter to load the GPMC console.; In the left pane of GPMC, click the domain name to expand it. Select the policy you want to check ...

  8. windows server 2016

    I would advise against giving full control. That allows users to change permissions and take ownership of files. Modify rights should be sufficient for the vast majority of user's needs when it comes to shares. Other users could have the files locked if they are accessing the same exact files. In Windows Deny is Deny.

  9. windows

    Currently I'm using windows server 2012 and I'm interested to know whether there is any way to export User Rights Assignment into a txt file. I tried secedit /export /areas USER_RIGHTS /cfg d:\policies.txt The above should should export it. So, I get this: Current Output.

  10. Managing "Logon As a Service" Permissions Using Group Policy or

    Run the local (gpedit.msc) or domain (gpmc.msc) Group Policy Editor and go to the following GPO section: Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment. Find the Log on as a service policy. ADVERTISEMENT

  11. How to list windows privileges for any user

    3 Answers. Sorted by: 9. You can use AccessChk in accomplish this task. Accesschk "domain\user" -a * will list all the permissions of a given domain user. You can call this program within a PowerShell script, concatenate the results into a text file, then filter out just the permissions you want to know about. Share.

  12. How to configure log on as a batch job permissions on any server

    Locate the Local Policies, and then click User Rights Assignment. On the right pane of the window, double-click on log on as a batch job This will open up the Log on as a batch job Properties window. Click on Add Users or Group as shown below. This will open up the wizard below to select users, computers, service accounts or groups.

  13. Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

    On Windows Server 2022/2019/2016, only Administrators or Backup Operators can shut down or restart the server. It is reasonable, since in most cases a non-admin user must not have the privileges to shutdown a server (even accidentally). ... (User Rights Assignment). By default, only administrators can shutdown/restart the server remotely. Add a ...

  14. windows

    You cannot edit this User Rights Assignment policy because this setting is being managed by a domain-based Group Policy. In this case, the domain Group Policy setting has precedence and you are prevented from modifying the policy via Local Group Policy. To modify this policy, either: Modify the policy in the applicable domain Group Policy Object.

  15. Change User Rights Assignment Security Policy Settings in Windows 10

    User Rights Assignment policies govern the methods by which a user can log on to a system. User rights are applied at the local device level, and they allow users to perform tasks on a device or in a domain. User rights include logon rights and permissions. Logon rights control who is authorized to log on to a device and how they can log on.

  16. The user rights that are required by Update.exe

    832475 Description of the new features in the package installer for Windows software updates. The following table lists the user rights required by Update.exe. Group Policy Object Display Name. Required by Update.exe. Description. Back up files and directories. Required. You must have this user right to perform backup operations.

  17. How to define/grant the required user rights/permissions for a Backup

    5. From the right pane, right-click Create a token object. 6. Click " Add user or Group". 7. For the "Add user or Group" window, click Browse. 8. Type the desired user account to act as your Backup Exec System Account, then click Browse and then click Ok. 9.

  18. How to define/grant the required user rights/permissions for a Backup

    5. From the right pane, right-click Create a token object. 6. Click " Add user or Group". 7. For the "Add user or Group" window, click Browse. 8. Type the desired user account to act as your Backup Exec System Account, then click Browse and then click Ok. 9.