Skip to content

Commit fe9c96a

Browse files
committed
First pass, including note, and rearrange TOC
Does not include mssql-conf and adutil info Includes Final images
1 parent c7aa939 commit fe9c96a

14 files changed

Lines changed: 2024 additions & 148 deletions

‎docs/linux/media/sql-server-linux-ad-auth-understanding/ad_auth_explained_1.svg‎

Lines changed: 222 additions & 0 deletions
Loading

‎docs/linux/media/sql-server-linux-ad-auth-understanding/ad_auth_explained_2.svg‎

Lines changed: 240 additions & 0 deletions
Loading

‎docs/linux/media/sql-server-linux-ad-auth-understanding/ad_auth_explained_3.svg‎

Lines changed: 256 additions & 0 deletions
Loading

‎docs/linux/media/sql-server-linux-ad-auth-understanding/ad_auth_explained_4.svg‎

Lines changed: 303 additions & 0 deletions
Loading

‎docs/linux/media/sql-server-linux-ad-auth-understanding/ad_auth_explained_container.svg‎

Lines changed: 309 additions & 0 deletions
Loading

‎docs/linux/sql-server-linux-active-directory-auth-overview.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ In order to use Active Directory authentication, you must have an AD Domain Cont
3636
The details for how to configure AD authentication are provided in the tutorial, [Tutorial: Use Active Directory authentication with SQL Server on Linux](sql-server-linux-active-directory-authentication.md). The following list provides a summary with a link to each section in the tutorial:
3737

3838
1. [Join a SQL Server host to an Active Directory domain](sql-server-linux-active-directory-join-domain.md).
39-
1. [Create an AD user for SQL Server and set the ServicePrincipalName](sql-server-linux-active-directory-authentication.md#createuser).
39+
1. [Create an AD user for SQL Server and set the Service Principal Name](sql-server-linux-active-directory-authentication.md#createuser).
4040
1. [Configure the SQL Server service keytab](sql-server-linux-active-directory-authentication.md#configurekeytab).
4141
1. [Secure the keytab file](sql-server-linux-active-directory-authentication.md#configurekeytab).
4242
1. [Configure SQL Server to use the keytab file for Kerberos authentication](sql-server-linux-active-directory-authentication.md#configurekeytab).
@@ -48,6 +48,8 @@ The details for how to configure AD authentication are provided in the tutorial,
4848
- At this time, the only authentication method supported for database mirroring endpoint is `CERTIFICATE`. `WINDOWS` authentication method will be enabled in a future release.
4949
- SQL Server on Linux does not support NTLM protocol for remote connections. Local connection may work using NTLM.
5050

51-
## Next Steps
51+
## Next steps
5252

53-
For more information on how to implement Active Directory authentication for SQL Server on Linux, see [Tutorial: Use Active Directory authentication with SQL Server on Linux](sql-server-linux-active-directory-authentication.md).
53+
- [Tutorial: Use Active Directory authentication with SQL Server on Linux](sql-server-linux-active-directory-authentication.md)
54+
- [Understanding Active Directory authentication for SQL Server on Linux and containers](sql-server-linux-ad-auth-understanding.md)
55+
- [Troubleshooting Active Directory authentication for SQL Server on Linux and containers](sql-server-linux-ad-auth-troubleshooting.md)

‎docs/linux/sql-server-linux-active-directory-authentication.md‎

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,11 @@ CONTOSO.COM = {
261261
262262
> [!NOTE]
263263
> SQL Server login by using an FQDN (for example, CONTOSO.COM\Username) is not supported. Use the CONTOSO\Username format.
264-
>
264+
>
265265
> SQL Server logins from Domain Local groups are not supported. Use Global Security Domain groups instead.
266-
267-
## Next steps
268266
269-
In this tutorial, we walked through how to set up Active Directory authentication with SQL Server on Linux. You learned how to:
270-
> [!div class="checklist"]
271-
> * Join [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] host to AD domain
272-
> * Create AD user for [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] and set SPN
273-
> * Configure [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] service keytab
274-
> * Create AD-based logins in Transact-SQL
275-
> * Connect to [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] using AD Authentication
276-
277-
Next, explore other security scenarios for SQL Server on Linux.
267+
## Next steps
278268
279-
> [!div class="nextstepaction"]
280-
> [Encrypting Connections to SQL Server on Linux](sql-server-linux-encrypted-connections.md)
269+
- [Encrypting Connections to SQL Server on Linux](sql-server-linux-encrypted-connections.md)
270+
- [Understanding Active Directory authentication for SQL Server on Linux and containers](sql-server-linux-ad-auth-understanding.md)
271+
- [Troubleshooting Active Directory authentication for SQL Server on Linux and containers](sql-server-linux-ad-auth-troubleshooting.md)

‎docs/linux/sql-server-linux-ad-auth-adutil-introduction.md‎

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Introduction to adutil - Active Directory Utility
3-
description: Overview of adutil and using it to configure Active Directory for SQL Server on Linux
3+
description: Overview of adutil utility for configuring and managing Active Directory domains for SQL Server on Linux and containers
44
author: amvin87
55
ms.author: amitkh
6-
ms.reviewer: vanto
7-
ms.date: 09/30/2021
6+
ms.reviewer: vanto, rwestMSFT
7+
ms.date: 03/07/2022
88
ms.topic: conceptual
99
ms.prod: sql
1010
ms.technology: linux
@@ -13,35 +13,35 @@ moniker: ">= sql-server-linux-2017 || >= sql-server-2017 || =sqlallproducts-allv
1313

1414
# Introduction to adutil - Active Directory utility
1515

16-
Adutil is a command-line interface (CLI) utility for interacting and managing Active Directory domains. You can use this tool to simplify Active Directory (AD) authentication configuration for both SQL Server on Linux and Linux-based SQL containers. Adutil eliminates the need to switch between Windows and Linux machines to manage Windows Active Directory when enabling AD authentication for SQL Server on Linux and containers.
17-
18-
Having adutil isn't a prerequisite for enabling AD authentication for SQL Server on Linux. You can use utilities like ktpass, as explained in [Tutorial: Use Active Directory authentication with SQL Server on Linux](sql-server-linux-active-directory-authentication.md), to enable AD authentication for SQL Server on Linux or containers.
19-
20-
Adutil is designed as a series of commands and subcommands, with additional flags that can be specified as further input. A category of administrative functions is represented by each top-level command. Within that category, each subcommand is an operation. We'll show you how you can download and get started with adutil.
21-
22-
> [!NOTE]
23-
> adutil is a tool developed with SQL Server as the application. Hence, support for adutil will be limited for SQL Server use cases only.
24-
>
25-
> For controlled and secure environments where Lightweight Directory Access Protocol (LDAP) over Secure Sockets Layer (SSL) aka LDAPS is preferred over Lightweight Directory Access Protocol (LDAP).
26-
>
27-
> Please enable or set the “useLdaps“ option to ‘true’ in adutil.json configuration file which is usually located at: “/var/opt/mssql/.adutil/adutil.json” when run under the mssql user. Here is a sample json with setting:
28-
>
29-
> ```bash
30-
> {
31-
> "useLdaps": "true"
32-
> }
33-
> ```
34-
> By default, the useLDAPS setting is set to "false". When configuring this setting and using mssql-conf to create the keytab, make sure the mssql-conf command is running as the user mssql. To set up the keytab using the mssql-conf option, follow the steps below::
35-
>
36-
> 1. To run as mssql user, you can run the command: “sudo su mssql”
37-
> 2. Now you can run the command to setup the keytab using the command: “mssql-conf setup-ad-keytab”
38-
>
39-
> If you are using regular LDAP we would like to clarify that passwords are not exchanged in plain text. For more information on how to configure LDAPS and how it differs from LDAP. Please refer the article [LDAP over SSL (LDAPS) Certificate](https://social.technet.microsoft.com/wiki/contents/articles/2980.ldap-over-ssl-ldaps-certificate.aspx#Enabling_LDAPS_for_Client_Authentication)
16+
[!INCLUDE [SQL Server - Linux](../includes/applies-to-version/sql-linux.md)]
17+
18+
The **adutil** tool is a command-line interface (CLI) utility for configuring and managing Active Directory domains for SQL Server on Linux and containers, without switching between Windows and Linux machines to manage Windows Active Directory.
19+
20+
You don't need to use **adutil** to enable AD authentication for SQL Server on Linux or containers. You can also use utilities like **ktpass**, as explained in [Tutorial: Use Active Directory authentication with SQL Server on Linux](sql-server-linux-active-directory-authentication.md).
21+
22+
The **adutil** tool is designed as a series of commands and subcommands, with additional flags that you specify as further input. Each top level command represents a category of administrative functions. Within that category, each subcommand is an operation. This article will show you how you can download and get started with **adutil**.
23+
24+
## Configuring adutil for LDAP over Secure Sockets Layer (SSL)
25+
26+
Support for **adutil** is limited for SQL Server use cases only. Controlled and secure environments using Lightweight Directory Access Protocol (LDAP) over SSL (LDAPS) are preferred over Lightweight Directory Access Protocol (LDAP).
27+
28+
You can set the `useLdaps` option to `true` in the `adutil.json` configuration file, which is located at: `/var/opt/mssql/.adutil/adutil.json` when run under the `mssql` user. This JSON code sample shows how to configure the setting:
29+
30+
```json
31+
{
32+
"useLdaps": "true"
33+
}
34+
```
35+
36+
By default, the `useLDAPS` setting is set to `false`. When configuring this setting and using **mssql-conf** to create the keytab (key table), make sure you run **mssql-conf** as the user `mssql`.
37+
38+
To set up the keytab file, see [Create the SQL Server service keytab file](sql-server-linux-ad-auth-adutil-tutorial.md#create-the-sql-server-service-keytab-file).
39+
40+
For more information on how to configure LDAPS and how it differs from LDAP, see [LDAP over SSL (LDAPS) Certificate](https://social.technet.microsoft.com/wiki/contents/articles/2980.ldap-over-ssl-ldaps-certificate.aspx#Enabling_LDAPS_for_Client_Authentication).
4041

4142
## Installing adutil
4243

43-
> [!NOTE]
44-
> If you do not accept the EULA during the time of install, when you run the adutil command for the first time, you will have to run it with the flag `--accept-eula`. This is true for all distributions.
44+
If you do not accept the EULA during the time of install, when you run the **adutil** command for the first time, you will have to run it with the flag `--accept-eula`. This is true for all distributions.
4545

4646
# [RHEL](#tab/rhel)
4747

@@ -51,13 +51,13 @@ Adutil is designed as a series of commands and subcommands, with additional flag
5151
sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/8/prod.repo
5252
```
5353

54-
1. If you had a previous preview version of adutil installed, remove any older adutil packages using the below command.
54+
1. If you had a previous preview version of **adutil** installed, remove any older **adutil** packages using the below command.
5555

5656
```bash
5757
sudo yum remove adutil-preview
5858
```
5959

60-
1. Run the following commands to install **adutil**. `ACCEPT_EULA=Y` accepts the EULA for adutil. The EULA is placed at the path `/usr/share/adutil/`.
60+
1. Run the following commands to install **adutil**. `ACCEPT_EULA=Y` accepts the EULA for **adutil**. The EULA is placed at the path `/usr/share/adutil/`.
6161

6262
```bash
6363
sudo ACCEPT_EULA=Y yum install -y adutil
@@ -81,13 +81,13 @@ Adutil is designed as a series of commands and subcommands, with additional flag
8181
sudo curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
8282
```
8383

84-
1. If you had a previous preview version of adutil installed, remove any older adutil packages using the below command.
84+
1. If you had a previous preview version of **adutil** installed, remove any older **adutil** packages using the below command.
8585

8686
```bash
8787
sudo apt-get remove adutil-preview
8888
```
8989

90-
1. Run the following command to install **adutil**. `ACCEPT_EULA=Y` accepts the EULA for adutil. The EULA is placed at the path `/usr/share/adutil/`.
90+
1. Run the following command to install **adutil**. `ACCEPT_EULA=Y` accepts the EULA for **adutil**. The EULA is placed at the path `/usr/share/adutil/`.
9191

9292
```bash
9393
sudo apt-get update
@@ -112,28 +112,28 @@ Adutil is designed as a series of commands and subcommands, with additional flag
112112
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/15/prod.repo
113113
```
114114

115-
1. If you had a previous preview version of adutil installed, remove any older adutil packages using the below command.
115+
1. If you had a previous preview version of **adutil** installed, remove any older **adutil** packages using the below command.
116116

117117
```bash
118118
sudo zypper remove adutil-preview
119119
```
120120

121-
1. Run the following command to install **adutil**. `ACCEPT_EULA=Y` accepts the EULA for adutil. The EULA is placed at the path `/usr/share/adutil/`.
121+
1. Run the following command to install **adutil**. `ACCEPT_EULA=Y` accepts the EULA for **adutil**. The EULA is placed at the path `/usr/share/adutil/`.
122122

123123
```bash
124124
sudo ACCEPT_EULA=Y zypper install -y adutil
125125
```
126126

127127
---
128128

129-
## Manage Windows AD using adutil
129+
## Use adutil to manage Windows AD
130130

131-
Ensure that you download adutil to a host that is domain joined. You also need to obtain or renew the kerberos TGT (ticket-granting ticket) using the `kinit` command. Ensure that the account you use to `kinit` with has the permissions to execute the actions you intend to run on Windows AD through the adutil tool. For example, if you intend to create accounts and service principal names (SPN) using the adutil tool, then you should `kinit` with the account that has privileges to create SPNs and users on your AD.
131+
Make sure that you download **adutil** to a host that is already joined to an AD domain. You also need to obtain or renew the Kerberos TGT (ticket-granting ticket), using the **kinit** command and a privileged domain account. The account you use must have permission to create accounts and Service Principal Names (SPNs) on the domain.
132132

133-
Here are some examples of actions that you can perform using adutil. To see a list of top-level commands, type `adutil --help`. This command will show you the top-level commands that you can use to manage and interact with AD.
133+
Here are some examples of actions that you can perform using **adutil**. To see a list of top-level commands, type `adutil --help`. This command will show you the top-level commands that you can use to manage and interact with AD.
134134

135135
```bash
136-
$adutil --help
136+
$ adutil --help
137137
adutil - A general AD utility
138138
Usage:
139139
adutil [account|delegation|group|keytab|machine|ou|spn|user|config]
@@ -153,6 +153,7 @@ Here are some examples of actions that you can perform using adutil. To see a li
153153
-d --debug Display additional debugging information when making LDAP/Kerberos calls.
154154
--accept-eula Accepts the current EULA for adutil. This has no effect if the EULA has already been accepted.
155155
```
156+
156157
To seek help with the next level of commands, you can further run the help option as shown below:
157158
158159
```bash
@@ -192,27 +193,27 @@ search - Search for an SPN by name or list all SPNs in the directory
192193
193194
## Samples
194195
195-
Each command is documented so that you can get started right away. Here are some of the typical activities that adutil is used for when configuring or administering AD authentication for SQL Server on Linux and containers:
196+
Each command is documented so you can get started right away. Here are some of the typical activities that **adutil** is used for when configuring or administering AD authentication for SQL Server on Linux and containers:
196197
197-
- Creating an account in AD:
198+
- Create an account in AD:
198199
199200
```bash
200201
adutil user create --name sqluser --distname CN=sqluser,CN=Users,DC=CONTOSO,DC=COM
201202
```
202203
203-
- Creating SPNs associated with an account or service:
204+
- Create SPNs associated with an account or service:
204205
205206
```bash
206207
adutil spn addauto -n sqluser -s MSSQLSvc -H mymachine.contoso.com -p 1433
207208
```
208209
209-
- Creating keytabs using adutil:
210+
- Create keytab files using **adutil**:
210211
211-
```bash
212+
```bash
212213
adutil keytab createauto -k /var/opt/mssql/secrets/mssql.keytab -p 1433 -H mymachine.contoso.com --password 'P@ssw0rd' -s MSSQLSvc
213214
```
214215
215-
You can refer to the reference manual page of adutil using the command `man adutil`.
216+
You can refer to the reference manual page of **adutil** using the command `man adutil`.
216217
217218
## Next steps
218219

0 commit comments

Comments
 (0)