| | | Ultimate IT Security is a division of Monterey Technology Group, Inc. ©2006-2024 Monterey Technology Group, Inc. All rights reserved. Disclaimer: We do our best to provide quality information and expert commentary but use all information at your own risk. For complaints, please contact [email protected]. | | | |
#microsoft #windows #security
Backup files and directories.
This user right determines which users can bypass file and directory, registry, and other persistent object permissions for the purposes of backing up the system.
Specifically, this user right is similar to granting the following permissions to the user or group in question on all files and folders on the system:
Traverse Folder/Execute File List Folder/Read Data Read Attributes Read Extended Attributes Read Permissions
Assigning this user right can be a security risk. Since there is no way to be sure that a user is backing up data, stealing data, or copying data to be distributed, only assign this user right to trusted users.
Comments: , default: , supported on: , registry settings: , reboot required: , related content.
You can add, remove, and check user rights assignment (remotely / locally) with the following powershell scripts..
Posted by : blakedrumm on Jan 5, 2022
Remote computer, output types.
This post was last updated on August 29th, 2022
I stumbled across this gem ( weloytty/Grant-LogonAsService.ps1 ) that allows you to grant Logon as a Service Right for a User. I modified the script you can now run the Powershell script against multiple machines, users, and user rights.
How to get it.
All of the User Rights that can be set:
Privilege | PrivilegeName |
---|---|
SeAssignPrimaryTokenPrivilege | Replace a process level token |
SeAuditPrivilege | Generate security audits |
SeBackupPrivilege | Back up files and directories |
SeBatchLogonRight | Log on as a batch job |
SeChangeNotifyPrivilege | Bypass traverse checking |
SeCreateGlobalPrivilege | Create global objects |
SeCreatePagefilePrivilege | Create a pagefile |
SeCreatePermanentPrivilege | Create permanent shared objects |
SeCreateSymbolicLinkPrivilege | Create symbolic links |
SeCreateTokenPrivilege | Create a token object |
SeDebugPrivilege | Debug programs |
SeDelegateSessionUserImpersonatePrivilege | Obtain an impersonation token for another user in the same session |
SeDenyBatchLogonRight | Deny log on as a batch job |
SeDenyInteractiveLogonRight | Deny log on locally |
SeDenyNetworkLogonRight | Deny access to this computer from the network |
SeDenyRemoteInteractiveLogonRight | Deny log on through Remote Desktop Services |
SeDenyServiceLogonRight | Deny log on as a service |
SeEnableDelegationPrivilege | Enable computer and user accounts to be trusted for delegation |
SeImpersonatePrivilege | Impersonate a client after authentication |
SeIncreaseBasePriorityPrivilege | Increase scheduling priority |
SeIncreaseQuotaPrivilege | Adjust memory quotas for a process |
SeIncreaseWorkingSetPrivilege | Increase a process working set |
SeInteractiveLogonRight | Allow log on locally |
SeLoadDriverPrivilege | Load and unload device drivers |
SeLockMemoryPrivilege | Lock pages in memory |
SeMachineAccountPrivilege | Add workstations to domain |
SeManageVolumePrivilege | Perform volume maintenance tasks |
SeNetworkLogonRight | Access this computer from the network |
SeProfileSingleProcessPrivilege | Profile single process |
SeRelabelPrivilege | Modify an object label |
SeRemoteInteractiveLogonRight | Allow log on through Remote Desktop Services |
SeRemoteShutdownPrivilege | Force shutdown from a remote system |
SeRestorePrivilege | Restore files and directories |
SeSecurityPrivilege | Manage auditing and security log |
SeServiceLogonRight | Log on as a service |
SeShutdownPrivilege | Shut down the system |
SeSyncAgentPrivilege | Synchronize directory service data |
SeSystemEnvironmentPrivilege | Modify firmware environment values |
SeSystemProfilePrivilege | Profile system performance |
SeSystemtimePrivilege | Change the system time |
SeTakeOwnershipPrivilege | Take ownership of files or other objects |
SeTcbPrivilege | Act as part of the operating system |
SeTimeZonePrivilege | Change the time zone |
SeTrustedCredManAccessPrivilege | Access Credential Manager as a trusted caller |
SeUndockPrivilege | Remove computer from docking station |
Note You may edit line 558 in the script to change what happens when the script is run without any arguments or parameters, this also allows you to change what happens when the script is run from the Powershell ISE.
Here are a few examples:
Add Users Single Users Example 1 Add User Right “Allow log on locally” for current user: . \Set-UserRights.ps1 -AddRight -UserRight SeInteractiveLogonRight Example 2 Add User Right “Log on as a service” for CONTOSO\User: . \Set-UserRights.ps1 -AddRight -Username CONTOSO\User -UserRight SeServiceLogonRight Example 3 Add User Right “Log on as a batch job” for CONTOSO\User: . \Set-UserRights.ps1 -AddRight -Username CONTOSO\User -UserRight SeBatchLogonRight Example 4 Add User Right “Log on as a batch job” for user SID S-1-5-11: . \Set-UserRights.ps1 -AddRight -Username S-1-5-11 -UserRight SeBatchLogonRight Add Multiple Users / Rights / Computers Example 5 Add User Right “Log on as a service” and “Log on as a batch job” for CONTOSO\User1 and CONTOSO\User2 and run on, local machine and SQL.contoso.com: . \Set-UserRights.ps1 -AddRight -UserRight SeServiceLogonRight , SeBatchLogonRight -ComputerName $ env : COMPUTERNAME , SQL.contoso.com -UserName CONTOSO\User1 , CONTOSO\User2
Remove Users Single Users Example 1 Remove User Right “Allow log on locally” for current user: . \Set-UserRights.ps1 -RemoveRight -UserRight SeInteractiveLogonRight Example 2 Remove User Right “Log on as a service” for CONTOSO\User: . \Set-UserRights.ps1 -RemoveRight -Username CONTOSO\User -UserRight SeServiceLogonRight Example 3 Remove User Right “Log on as a batch job” for CONTOSO\User: . \Set-UserRights.ps1 -RemoveRight -Username CONTOSO\User -UserRight SeBatchLogonRight Example 4 Remove User Right “Log on as a batch job” for user SID S-1-5-11: . \Set-UserRights.ps1 -RemoveRight -Username S-1-5-11 -UserRight SeBatchLogonRight Remove Multiple Users / Rights / Computers Example 5 Remove User Right “Log on as a service” and “Log on as a batch job” for CONTOSO\User1 and CONTOSO\User2 and run on, local machine and SQL.contoso.com: . \Set-UserRights.ps1 -RemoveRight -UserRight SeServiceLogonRight , SeBatchLogonRight -ComputerName $ env : COMPUTERNAME , SQL.contoso.com -UserName CONTOSO\User1 , CONTOSO\User2
In order to check the Local User Rights, you will need to run the above (Get-UserRights), you may copy and paste the above script in your Powershell ISE and press play.
Note You may edit line 494 in the script to change what happens when the script is run without any arguments or parameters, this also allows you to change what happens when the script is run from the Powershell ISE.
Get Local User Account Rights and output to text in console:
Get Remote SQL Server User Account Rights:
Get Local Machine and SQL Server User Account Rights:
Output Local User Rights on Local Machine as CSV in ‘C:\Temp’:
Output to Text in ‘C:\Temp’:
PassThru object to allow manipulation / filtering:
I like to collaborate and work on projects. My skills with Powershell allow me to quickly develop automated solutions to suit my customers, and my own needs.
Email : [email protected]
Website : https://blakedrumm.com
My name is Blake Drumm, I am working on the Azure Monitoring Enterprise Team with Microsoft. Currently working to update public documentation for System Center products and write troubleshooting guides to assist with fixing issues that may arise while using the products. I like to blog on Operations Manager and Azure Automation products, keep checking back for new posts. My goal is to post atleast once a month if possible.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Provides an overview and links to information about the User Rights Assignment security policy settings user rights that are available in Windows. User rights 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. User rights permissions control access to computer and domain resources, and they can override permissions that have been set on specific objects. User rights are managed in Group Policy under the User Rights Assignment item.
Each user right has a constant name and a Group Policy name associated with it. The constant names are used when referring to the user right in log events. 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).
For information about setting security policies, see Configure security policy settings .
The following table links to each security policy setting and provides the constant name for each. Setting descriptions contain reference information, best practices for configuring the policy setting, default values, differences between operating system versions, and considerations for policy management and security.
Group Policy Setting | Constant Name |
---|---|
SeTrustedCredManAccessPrivilege | |
SeNetworkLogonRight | |
SeTcbPrivilege | |
SeMachineAccountPrivilege | |
SeIncreaseQuotaPrivilege | |
SeInteractiveLogonRight | |
SeRemoteInteractiveLogonRight | |
SeBackupPrivilege | |
SeChangeNotifyPrivilege | |
SeSystemtimePrivilege | |
SeTimeZonePrivilege | |
SeCreatePagefilePrivilege | |
SeCreateTokenPrivilege | |
SeCreateGlobalPrivilege | |
SeCreatePermanentPrivilege | |
SeCreateSymbolicLinkPrivilege | |
SeDebugPrivilege | |
SeDenyNetworkLogonRight | |
SeDenyBatchLogonRight | |
SeDenyServiceLogonRight | |
SeDenyInteractiveLogonRight | |
SeDenyRemoteInteractiveLogonRight | |
SeEnableDelegationPrivilege | |
SeRemoteShutdownPrivilege | |
SeAuditPrivilege | |
SeImpersonatePrivilege | |
SeIncreaseWorkingSetPrivilege | |
SeIncreaseBasePriorityPrivilege | |
SeLoadDriverPrivilege | |
SeLockMemoryPrivilege | |
SeBatchLogonRight | |
SeServiceLogonRight | |
SeSecurityPrivilege | |
SeRelabelPrivilege | |
SeSystemEnvironmentPrivilege | |
SeDelegateSessionUserImpersonatePrivilege | |
SeManageVolumePrivilege | |
SeProfileSingleProcessPrivilege | |
SeSystemProfilePrivilege | |
SeUndockPrivilege | |
SeAssignPrimaryTokenPrivilege | |
SeRestorePrivilege | |
SeShutdownPrivilege | |
SeSyncAgentPrivilege | |
SeTakeOwnershipPrivilege |
IMAGES
VIDEO
COMMENTS
This article describes the recommended practices, location, values, policy management, and security considerations for the Back up files and directories security policy setting. This user right determines which users can bypass file and directory, registry, and other persistent object permissions for the purposes of backing up the system.
This tutorial will show you how to change User Rights Assignment security policy settings to control users and groups ability to perform tasks in Windows 10. You must be signed in as an administrator to change User Rights Assignment.
If you are using backup software that runs under specific service accounts, only these accounts (and not the IT staff) should have the Back up files and directories user right. Location GPO_name \Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment
This security setting determines which users can bypass file, directory, registry, and other persistent object permissions when they restore backed up files and directories, and it determines which users can set valid security principals as the owner of an object.
In Windows, you can back up the current permissions of a file, folder, or drive to a .txt file, and be able to restore the permissions later if needed. This tutorial will show you how to backup and restore permissions for files, folders, and drives in Windows 7, Windows 8, and Windows 10.
Navigate to Local Computer Policy >> Computer Configuration >> Windows Settings >> Security Settings >> Local Policies >> User Rights Assignment. If any groups or accounts other than the following are granted the "Back up files and directories" user right, this is a finding: Administrators
AKA: SeBackupPrivilege, Back up files and directories Default assignment: Administrators and Backup Operators This right allows you access any persistent object (file, folder, registry key, et al) on the computer using the Win32 backup APIs.
This user right determines which users can bypass file and directory, registry, and other persistent object permissions for the purposes of backing up the system.
You can add, remove, and check User Rights Assignment (remotely / locally) with the following Powershell scripts. This post was last updated on August 29th, 2022. I stumbled across this gem (weloytty/Grant-LogonAsService.ps1) that allows you to grant Logon as a Service Right for a User.
User rights permissions control access to computer and domain resources, and they can override permissions that have been set on specific objects. User rights are managed in Group Policy under the User Rights Assignment item.