Sql server права учетной записи программы установки ошибка

Описание MS SQL Права учетной записи программы установки

Столкнулся с такой проблемой удаления экземпляра Microsoft SQL Server 2017:

Ошибка гласит:
Проверка правила «Права учетной записи программ установки» окончилась неудачно.
Учетная запись, выполняющая установку SQL Server, не имеет части следующих прав: права архивации файлов и папок, права управления аудитом и журналами безопасности и права отладки программ. Чтобы продолжить установку, войдите в систему с учетной записью, имеющей все эти права.

Решение MS SQL Права учетной записи программы установки

1) Идем в оснастку Локальная политика безопасности
Win + R и вводим secpol.msc
Другие полезные команды в шпаргалке по musthave командам Windows

2) В открывшейся оснастке идем в Параметры безопасности > Локальные политики > Назначение прав пользователя 

3) Добавляем своего пользователя в группы Восстановление файлов и каталогов, Отладка программ, Управление аудитом и журналом безопасности

4) Если у вас Active Directory и вы по бестпрактису секюрности домена убрали всех пользователей из группы Отладка программ, как я :), то идем на контроллер домена, ищем в GPO политику и временно добавляем себя в эту группу, а после установки/удаления MS SQL Server, возвращаем всё как было.

5) Всё работает, Вы восхитительны

Если Вам было полезно или есть вопросы, оставляйте комментарии, всем удачи 🙂

Hi friends, in this article, we’ll be discussing about an error message you might get under certain circumstances, when installing SQL Server. The title of the error is Rule “Setup account privileges” failed and more specifically it reports the following:

The account that is running SQL Server Setup doesn’t have one or all of the following rights: the right to back up files and directories, the right to manage auditing and the security log and the right to debug programs. To continue, use an account with both of these rights.

Root Cause Analysis

The root cause for the issue, is exactly what the error message says, meaning that the user that performs the installation of SQL Server, lacks certain permissions on the environment onto SQL Server is being installed. These permissions, are specific policy user rights.

The above scenario only happens when the default security policy permissions in Windows are changed (for example these permissions are removed for local administrators on the machine by a custom security policy within an organization).

How to Resolve the Issue

After you make sure that you are user is a local administrator on the machine onto which you are trying to install SQL Server, the next step is to make sure that your user has the following security policy permissions:

  • Backup files and directories
  • Debug Programs
  • Manage auditing and security log 

To to do this, you will need to run “secpol.msc” in order to open the Local Security Policy in Windows.

Then you navigate to “Local Policies” and then “User Right Assignments”, and from there, you can manage the user permissions so that your user is allowed to perform the installation.

After the installation is completed, you can revoke the additional permissions you have granted (make sure you do not remove any other permissions – only those you have temporarily granted for the installation process).

If you are not able to manage the permissions, you will need to discuss it with your Domain Administrator.

Example of default security policy permissions on my environment:

Rule "Setup account privileges" failed - How to Resolve - Article on SQLNetHub


Strengthen your SQL Server Administration Skills – Enroll to our Online Course!

Check our online course on Udemy titled “Essential SQL Server Administration Tips
(special limited-time discount included in link).

Via the course, you will learn essential hands-on SQL Server Administration tips on SQL Server maintenance, security, performance, integration, error handling and more. Many live demonstrations and downloadable resources included!

Essential SQL Server Administration Tips - Online Course with Live Demonstrations and Hands-on Guides

(Lifetime Access/ Live Demos / Downloadable Resources and more!)

Enroll from $12.99


Learn essential SQL Server development tips! Enroll to our Online Course!

Check our online course titled “Essential SQL Server Development Tips for SQL Developers
(special limited-time discount included in link).

Sharpen your SQL Server database programming skills via a large set of tips on T-SQL and database development techniques. The course, among other, features over than 30 live demonstrations!

Essential SQL Server Development Tips for SQL Developers - Online Course

(Lifetime Access, Certificate of Completion, downloadable resources and more!)

Enroll from $12.99


Featured Online Courses:

  • SQL Server 2022: What’s New – New and Enhanced Features
  • Introduction to Azure Database for MySQL
  • Working with Python on Windows and SQL Server Databases
  • Boost SQL Server Database Performance with In-Memory OLTP
  • Introduction to Azure SQL Database for Beginners
  • Essential SQL Server Administration Tips
  • SQL Server Fundamentals – SQL Database for Beginners
  • Essential SQL Server Development Tips for SQL Developers
  • Introduction to Computer Programming for Beginners
  • .NET Programming for Beginners – Windows Forms with C#
  • SQL Server 2019: What’s New – New and Enhanced Features
  • Entity Framework: Getting Started – Complete Beginners Guide
  • A Guide on How to Start and Monetize a Successful Blog
  • Data Management for Beginners – Main Principles

Read Also:

  • Useful Python Programming Tips
  • SQL Server 2022: What’s New – New and Enhanced Features (Course Preview)
  • How to Connect to SQL Server Databases from a Python Program
  • Working with Python on Windows and SQL Server Databases (Course Preview)
  • The multi-part identifier … could not be bound
  • Where are temporary tables stored in SQL Server?
  • How to Patch a SQL Server Failover Cluster
  • Operating System Error 170 (Requested Resource is in use)
  • Installing SQL Server 2016 on Windows Server 2012 R2: Rule KB2919355 failed
  • The operation failed because either the specified cluster node is not the owner of the group, or the node is not a possible owner of the group
  • A connection was successfully established with the server, but then an error occurred during the login process.
  • SQL Server 2008 R2 Service Pack Installation Fails – Element not found. (Exception from HRESULT: 0x80070490)
  • There is insufficient system memory in resource pool ‘internal’ to run this query.
  • Argument data type ntext is invalid for argument …
  • Fix: VS Shell Installation has Failed with Exit Code 1638
  • Essential SQL Server Development Tips for SQL Developers
  • Introduction to Azure Database for MySQL (Course Preview)
  • [Resolved] Operand type clash: int is incompatible with uniqueidentifier
  • The OLE DB provider “Microsoft.ACE.OLEDB.12.0” has not been registered – How to Resolve it
  • SQL Server replication requires the actual server name to make a connection to the server – How to Resolve it
  • Issue Adding Node to a SQL Server Failover Cluster – Greyed Out Service Account – How to Resolve
  • Data Management for Beginners – Main Principles (Course Preview)
  • Resolve SQL Server CTE Error – Incorrect syntax near ‘)’.
  • SQL Server is Terminating Because of Fatal Exception 80000003 – How to Troubleshoot
  • An existing History Table cannot be specified with LEDGER=ON – How to Resolve
  • … more SQL Server troubleshooting articles

Subscribe to our newsletter and stay up to date!

Subscribe to our YouTube channel (SQLNetHub TV)

Rate this article: 1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Loading…

Reference: SQLNetHub.com (https://www.sqlnethub.com)

© SQLNetHub

Artemakis Artemiou

Artemakis Artemiou is a Senior SQL Server Architect, Author, a 9 Times Microsoft Data Platform MVP (2009-2018). He has over 20 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and {essentialDevTips.com}. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Moreover, Artemakis teaches on Udemy, you can check his courses here.

Views: 2,107

    1. Resources
    2. Errors and Solutions
    3. Windows Errors

Posted Date:

14 Aug 2014 |Updated:

14-Aug-2014 |Category: Windows Errors | |Member Level: Silver |Points: 25 |

In this article I am going to Explain how to resolve the error «Sql Server Setup Failed Setup Account Privileges while installing SQL Server» We used get the above error while installing. To resolve the error we needs to change the some Local Policy settings to the current user we are going to see the steps below for the solution.

A new installation of Microsoft SQL Server 2012 or Microsoft SQL Server 2008 R2 fails
You see the following error message when you try to install a new instance of SQL Server 2012 or SQL Server 2008 R2:
Rule «Setup account privileges» failed.

The account that is running SQL Server Setup does not have one or all of the following rights: the right to back up files and directories, the right to manage auditing and the security log and the right to debug programs. To continue, use an account with both of these rights.

Account setup privilageous
To Resolve this most of us used to giving permission to the folders and C drive and all .
But The Reason for the above error is, when we trying to adding the user account that is running the Setup as a local administrator, the Setup user account requires the following default user rights for the Setup to be completed successfully. when we not set this error will occur,

To resolve this error We needs to change the below things in Local Policy Editor,

Local Policy Object Display Name User Right
Backup files and directories SeBackupPrivilege
Debug Programs SeDebugPrivilege
Manage auditing and security lo SeSecurityPrivilege

How to Edit the Local Policy Objects:
To add the rights to the local administrator account, follow these steps:
1.Log on to the computer as a user who has administrative credentials.
2.Click Start, click Run, type Control admintools, and then click OK.
3.Double-click Local Security Policy.
4.In the Local Security Settings dialog box, click Local Policies, double-click User Rights Assignment, and then double-click Backup Files and Directories.
5.In the Backup Files and Directories Properties dialog box, click Add User or Group.
6.In the Select User or Groups dialog box, type the user account that is being used for setup, and then click OK two times.
7.Repeat the procedure for the other two policies that are mentioned in the «Cause» section.
8.On the File menu, click Exit to close the Local Security Settings dialog box.

Images I shared below for the reference:
Selecting Local Policy Editor:
Local Policy editor

Editing The settings:

Solution for account setup privilege

After this select the privilege and double click add the user or group and give ok for the selected user thats it and try to do the same for Debug Programs and Manage auditing and security. now try the SQl Installation it will work perfectly.

Thanks for reading.

Comments

We got Setup
Account Privileges Rule failed while installing SQL 2012.




Reason: 

The account that is running SQL Server Setup does not
have one or all of the following rights: 

1. Right to back up files and
directories

2.Right to manage auditing and the security log

3. Right to
debug programs.

Resolution:

I checked that user was part of both groups(Right to back up files and directories and Right to debug programs.) but it was not part of «Right to manage auditing and the security log» group.

So i added the user to this group.

1. Click Start, click Run, type secpol.msc,
and then click OK.

2. In the Local Security Settings dialog box,
click Local Policies, double-click User Rights Assignment, and then
double-click “Manage auditing and security log properties”.

3. In the “Manage auditing and security log properties”
dialog box, click Add User or Group.

In the Select User or Groups dialog box, type
the user account that is being used for setup, and then click OK two
times.

we re-run the SQL software and installation completed successfully.

  • Tweet
  • Share
  • Share
  • Share
  • Share

Unknown

SeDebugPrivilegeВ свете недавних событий с повышением вирусной активности многие организации стали уделять больше внимания вопросам всестороннего усиления мер безопасности в собственных ИТ-инфраструктурах. При этом некоторые из применяемых мер могут создать дополнительные сложности в работе самих ИТ-специалистов.

Как известно, в последних вариациях вирусов-шифровальщиков, таких как Petya, используются такие инструменты компрометации учётных данных, как Mimikatz. Одним из методов защиты от Mimikatz является запрет на получение в Windows-системе привилегии SeDebugPrivilege. В инфраструктуре Active Directory настроить такое ограничение можно глобально для всех компьютеров домена с помощью параметра групповой политики «Debug programs» в разделе Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > User Rights Assignment:

Если в данной политике явно задать доменную группу безопасности, то только члены данной группы смогут получить привилегию SeDebugPrivilege на всех компьютерах домена, на которые будет действовать данная групповая политика. Однако данная политика может осложнить жизнь не только инструментам типа Mimikatz, но и вполне легитимным приложениям, которые в своей работе могут использовать привилегии отладки. Например, после включения данной политики программа установки SQL Server 2012 может завершаться с ошибкой проверки правила «Setup account privileges» …

The account that is running SQL Server Setup does not have one or all of the following rights: the right to back up files and directories, the right to manage auditing and the security log and the right to debug programs. To continue, use an account with both of these rights.

…в том случае, если пользователь, от имени которого выполнятся установка, не был предварительно включён в соответствующую доменную группу безопасности, даже не смотря на то, что данный пользователь входит в группу локальных администраторов сервера.

Если заглянуть в отчёт SystemConfigurationCheck_Report.htm, который создаётся в процессе установки SQL Server в каталоге типа «C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\<отметка времени>\«…

  …, то мы увидим, что срабатывает правило HasSecurityBackupAndDebugPrivilegesCheck, которое и выполняет проверку наличия прав доступа SeSecurityPrivilege, SeBackupPrivilege и SeDebugPrivilege. Как я понял, если хотя бы одна из перечисленных привилегий не будет доступна пользователю, от имени которого запущен процесс установки SQL Server, то ошибка при проверке правила HasSecurityBackupAndDebugPrivilegesCheck неизбежна.

Как же быть в такой ситуации тем пользователям, которые являются локальными администраторами серверов, но не могут при этом установить SQL Server не прибегая к помощи администраторов безопасности уровня домена? Неужели каждый раз придётся терзать доменную группу безопасности, определённую в политике «Debug programs»?

Возникла идея «поковырять» вопрос того как, обладая правами локального администратора на сервере, но не входя при этом в группу безопасности из политики «Debug programs», успешно выполнить установку SQL Server. После некоторых экспериментов в этой области на платформе Windows Server 2012 R2 Standard с установщиком SQL Server Standard 2012 SP2 удалось добиться желаемого результата. В решении задачи помогла старенькая утилита ntrights.exe из пакета Windows Server 2003 Resource Kit Tools. Примеры использования утилиты можно найти в статье How to Set Logon User Rights with the Ntrights.exe Utility

Чтобы получить необходимую нам привилегию SeDebugPrivilege, достаточно выполнить команду типа:

C:\WinSrv2003RKTools\ntrights.exe +r SeDebugPrivilege -u KOM\Vasya

 Granting SeDebugPrivilege to KOM\Vasya   ... successful

где KOM\Vasya имя доменного пользователя, от имени которого мы будем выполнять установку SQL Server. После выполнения этой команды, соответствующему пользователю необходимо выполнить logoff/logon и запросить информацию о текущем наборе прав, например с помощью утилиты whoami:

C:\Windows\system32>whoami.exe /priv

PRIVILEGES INFORMATION
----------------------

Privilege Name                  Description                               State
=============================== ========================================= ========
...
SeSecurityPrivilege             Manage auditing and security log          Disabled
...
SeBackupPrivilege               Back up files and directories             Disabled
...
SeDebugPrivilege                Debug programs                            Disabled
...

Как видим, теперь все три нужные нам привилегии, необходимые для установки SQL Server получены, и мы можем снова попытаться выполнить установку. И на этот раз предварительная проверка и последующая установка должны пройти успешно.

SeDebugPrivilege

Однако помните про то, что после очередного применения групповой политики право SeDebugPrivilege будет снова изъято (согласно настроек доменных GPO) и уже после следующего logoff/logon данная привилегия у нашего пользователя перестанет работать.

На мой взгляд, такое поведение системы можно расценивать, как уязвимость, которую помимо легитимного локального администратора может эксплуатировать и вредительское ПО с уровнем прав локального администратора. То есть, даже с глобально включённой в домене политикой «Debug programs», по факту остаётся риск получения права SeDebugPrivilege со стороны вредоносного ПО, использующего такие инструменты, как Mimikatz.

Дополнительные источники информации:

  • KB2000257 — SQL Server installation fails if the Setup account doesn’t have certain user rights
  • Fort SQL — Installing SQL Server 2008 Services in a High-Security Domain (Part I),
    (Part II)
  • Esoteric — SQL 2012 Setup Rules – The ‘Missing Reference’

Понравилась статья? Поделить с друзьями:
  • Sql server ошибка при установке 1603
  • Spore ошибка alert
  • Sql server ошибка 924
  • Sql state 08001 native 18 ошибка безопасности ssl
  • Sql server ошибка 547