> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell/it/remote-desktop-manager-powershell/remote-desktop-manager-macos-enable-integrated-authentication-with-kerberos.md).

# Remote Desktop Manager macOS – Abilitare l'autenticazione integrata con Kerberos

Per utilizzare l'autenticazione integrata (Windows Authentication) su macOS, dovrà configurare un ***ticket Kerberos*** che colleghi il suo utente corrente a un account di dominio Windows. Di seguito è riportato un riepilogo dei passaggi principali.

{% hint style="danger" %}
Questa funzionalità sperimentale ha funzionato nei nostri test interni ed è una soluzione alternativa alla funzionalità di sicurezza integrata, che non funziona su macOS con SQL Server.

Detto ciò, l'implementazione iniziale di Kerberos aveva lo scopo di aiutare la nostra community nell'utilizzo di questo metodo di autenticazione. Tuttavia, dopo l'implementazione sono state apportate diverse modifiche sul lato Kerberos, quindi è possibile che questo metodo sia ormai obsoleto.
{% endhint %}

### Prerequisito: ottenere la configurazione del Kerberos Domain Controller (KDC)

Offriamo due metodi: la ricerca manuale o uno script PowerShell

Da eseguire su: un PC Windows aggiunto al suo dominio Active Directory. Tenga presente che qualsiasi dominio di livello produzione avrà più di un domain controller. Entrambi i metodi seguenti potrebbero restituire un server diverso a seconda di molteplici fattori. Sia pronto a eseguire nuovamente questa ricerca se il server designato diventasse non disponibile.

#### Ricerca manuale

{% hint style="info" %}
**nltest.exe** è un'utilità da console che può eseguire utilizzando l'interprete dei comandi di base o PowerShell.
{% endhint %}

Esegua nltest nella shell dei comandi di sua scelta.

```powershell
nltest /dsgetdc:%USERDNSDOMAIN%

DC: \\dc-33.domain.company.com
Address: \\2111:4444:2111:33:1111:ecff:ffff:3333

The command completed successfully
```

Copi il nome del DC, che è il valore di configurazione KDC richiesto, in questo caso dc-33.domain.company.com

#### Script PowerShell

Esegua quanto segue in una finestra di PowerShell (ricordi che il PC deve essere aggiunto al dominio di destinazione)

```powershell
$dcinfo = Get-ADDomainController -Discover
Write-Output "Domain name $($dcinfo.Domain)"
Write-Output "Domain Controller $($dcinfo.HostName)"
Write-Output "`nSuggested krb5.conf content`n-----------------------------------------"
Write-Output "[libdefaults]"
Write-Output "default_realm = $($dcinfo.Domain.ToUpper())"
Write-Output "
Write-Output "[realms]`n$($dcinfo.Domain.ToUpper()) = {"
Write-Output "kds = $($dcinfo.HostName)"
Write-Output "}"
```

### Configurare Kerberos su macOS

#### Passaggio 1: configurazione del KDC in krb5.conf

Modifichi il file /etc/krb5.conf con l'editor di sua scelta; tenga presente che deve elevare i suoi privilegi (sudo o altro). Se ha ottenuto il risultato dello script PowerShell, copi semplicemente le righe appropriate. Seguono i passaggi necessari se ha utilizzato la ricerca manuale.

{% hint style="warning" %}
Il dominio deve essere TUTTO IN MAIUSCOLO.
{% endhint %}

Configuri le seguenti impostazioni:

```powershell
[libdefaults]
 default_realm = DOMAIN.COMPANY.COM

[realms]
DOMAIN.COMPANY.COM = {
 kdc = dc-33.domain.company.com
}
```

Quindi salvi il file krb5.conf ed esca.

#### Passaggio 2: test del recupero del ticket granting ticket

Utilizzi il comando kinit <username@DOMAIN.COMPANY.COM> per ottenere un TGT dal KDC. Le verrà richiesta la password di dominio.

`kinit username<area>@DOMAIN.COMPANY.COM`

Utilizzi klist per visualizzare i ticket disponibili. Se il kinit è andato a buon fine, dovrebbe vedere un ticket.

```
klist

krbtgt/DOMAIN.COMPANY.COM@ DOMAIN.COMPANY.COM.
```

#### Passaggio 3: connettersi in Remote Desktop Manager

1. Crei un nuovo spazio di lavoro SQL Server.
2. Inserisca le informazioni dello spazio di lavoro (Nome e Host).
3. Selezioni la modalità “ ***Integrated Security (Active Directory)*** – ***Experimental*** ”.
4. Selezioni il database.
5. Salvi lo spazio di lavoro.

<figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4792.png" alt=""><figcaption></figcaption></figure>

Se ha seguito tutti i passaggi precedenti, dovrebbe riuscire a connettersi correttamente allo spazio di lavoro.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell/it/remote-desktop-manager-powershell/remote-desktop-manager-macos-enable-integrated-authentication-with-kerberos.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
