> For the complete documentation index, see [llms.txt](https://ajuda.rnp.br/cafe/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.rnp.br/cafe/pentaho/openldap/habilitando-o-campo-do-sambantpassword.md).

# Habilitando o campo do sambaNTPassword

### 1. Introdução&#x20;

Este tutorial apresenta os passos necessários para a configuração do campo sambaNTPassword no LDAP.

### 2. Roteiro

2.1 Após a instalação do OpenLDAP, selecione um usuário da base, como o exemplo abaixo:

<div data-with-frame="true"><figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FWAl7mIWJy9VPbpBOyIGe%2F1.png?alt=media&amp;token=c49494b8-b286-4ae7-9c8e-98033d3800d0" alt=""><figcaption></figcaption></figure></div>

2.2 Na tela à direita, selecione qualquer **objectClass** e clique com o botão direito. Vá em **"New Value"**:

<div data-with-frame="true"><figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FApw1xzbogKlnKtzjJm6Y%2F2.png?alt=media&amp;token=678e0b40-167f-4039-8009-4132956358c0" alt=""><figcaption></figcaption></figure></div>

2.3 Na tela abaixo, procure na coluna da esquerda por **"sambaSamAccount"** conforme ilustrado a seguir. Selecione, e clique em **"Add"** depois vá em **"Next"**:

<div data-with-frame="true"><figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FqLFbxBNbVkOVZYwZgxlC%2F3.png?alt=media&amp;token=7c0a0a0c-5f36-4b9a-818b-b0834bf51a6c" alt=""><figcaption></figcaption></figure></div>

2.4 Na tela seguinte, perceba que o **objectClass** do **"sambaSamAccount"** aparece inserido, e temos um novo campo do **"sambaSID"**

{% hint style="info" %}
O **sambaSID** é um identificador **único** para cada usuário, no exemplo abaixo, deixamos com o valor igual a 1, mas fica a critério da instituição qual valor deseja inserir.&#x20;
{% endhint %}

Após inserir o valor, clique em **"Finish"**.

<div data-with-frame="true"><figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FxhB9i7u4MhrMekck80mC%2F4.png?alt=media&amp;token=f65699d8-af6c-4173-ba18-15a3d8fff8ae" alt=""><figcaption></figcaption></figure></div>

2.5 Clique na área em branco, e vá na opção **"New Attribute..."**

<div data-with-frame="true"><figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FUGE03sQmqT17O6GZk5wo%2F5.png?alt=media&amp;token=c3ecb21a-7466-483b-8986-8ab432bf4715" alt=""><figcaption></figcaption></figure></div>

2.6 Na tela abaixo, procure por **"sambaNTPassword",** e em seguida clique em **"Finish"**

<figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FjX95IxNvSBvpYsr1Ok0C%2F6.png?alt=media&amp;token=c5fca03d-4003-4f9f-9e6f-ce1ce951ca14" alt=""><figcaption></figcaption></figure>

2.7 Após adicionar o atributo, ele aparecerá sem valor. Neste campo, é necessário colocar uma senha com o **Hash NTLM**.

Para isto, crie uma senha e converta no site abaixo para o Hash mencionado.

{% embed url="<https://www.browserling.com/tools/ntlm-hash>" %}

No exemplo abaixo, utilizamos a senha **"123456"**, em seguida, clicamos em **"Calculate NTLM Hash"**:

<figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2Fbs7D854LiO4o2espzgJ3%2F10.png?alt=media&amp;token=0b1ac4ca-76fc-44af-a370-4d0ac9b878a6" alt=""><figcaption></figcaption></figure>

Agora temos o **Hash NTLM** sendo baseado na senha inserida:

<figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FesgVIvJDj4HOB8iOd28j%2F11.png?alt=media&amp;token=edd89f8f-5c80-47de-a932-f828a65373c6" alt=""><figcaption></figcaption></figure>

Basta copia-lo para o campo do **"sambaNTPassword"**:

<figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FBAHbFvdvdM6DuNduUKha%2F7.png?alt=media&amp;token=8fdd3445-c1bd-474a-b1ba-d86d760f60b3" alt=""><figcaption></figcaption></figure>

2.8 Clique duas vezes na opção **userPassword**, que está em branco, e crie a nova senha para este campo. Feito isto, dê **"OK"**:

{% hint style="danger" %}
**IMPORTANTE**: A senha no campo do **sambaNTPassword** deverá ser a mesma senha no campo **userPassword**, ambos estarão criptografados de formas diferentes.

No exemplo utilizamos a senha **"123456"**, então o **userPassword** deverá ser preenchido com **"123456"**.
{% endhint %}

<figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FfnOo06AUaperWUN5JUZB%2F12.png?alt=media&amp;token=12675fc9-1ab4-4831-91d2-d5812b58905c" alt=""><figcaption></figcaption></figure>

2.9 Abaixo, é um exemplo de como os campos ficarão preenchidos:&#x20;

<figure><img src="https://3706451151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M94Z581aPIo4Bzo9ImS%2Fuploads%2FznlBRAZoo9Wh5PB8qPJe%2F9.png?alt=media&amp;token=f5adc526-77f8-4f3c-8a4b-003e31c50461" alt=""><figcaption></figcaption></figure>

Agora o LDAP estará configurado para os protocolos PAP (default) e MSCHAPv2 (sambaNTPassword).


---

# 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 following URL with the `ask` and `goal` query parameters:

```
GET https://ajuda.rnp.br/cafe/pentaho/openldap/habilitando-o-campo-do-sambantpassword.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
