question

karthik.kulkarni avatar image
karthik.kulkarni asked

Builtin\administrators removed on SQL Server Ubuntu instance

Hi ,

i happened to remove Builtin\administrators from a SQL Server ubuntu instance.

i have couple of issues i can notice, unable to read error log, cannot send email from sql server mail.

Is there any way we can add back this user? Thanks in advance for consideration.

Regards,

Karthik Kulkarni

sql security
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
anthony.green avatar image
anthony.green answered

Do you have any other account with sysadmin rights to SQL Server. Like the SA account or goven

If so you can add it back in quite easily.


Otherwise usually on windows you set the service to start with the -m switch and you then can add it back in and restart SQL removing the -m switch.

https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/connect-to-sql-server-when-system-administrators-are-locked-out?view=sql-server-ver15#step-by-step-instructions

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Anthony,


Thank you for your advice. The user is dropped on a sql instance installed on ubuntu system not on windows.

So i am facing it difficult to add back the user.

Regards,

Karthik Kulkarni

0 Likes 0 ·
Appreciate you’re in Linux but the first part of my answer remains.


If you have the SA login or some other sysadmin login you can re-add the BUILTIN\Administrators simply by re-creating it.

If not you should still be able to add the -m switch to the systemctl command to manually start SQL on Linux


systemctl start mssql-server -m

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.