# Ajout d'une machine linux a l'ad

prérequis:

- machine linux qui ping l'active directory

aller sur la machine linux et installé ces outils:

apt update &amp;&amp; apt upgrade

apt install realmd sssd sssd-tools libnss-sss libpam-sss adcli samba-common krb5-user chrony

une fois l'installation faite faire:

realm discover "nom de domaine de l'ad"

[![image.png](https://book.techoops.fr/uploads/images/gallery/2025-04/scaled-1680-/UYpimage.png)](https://book.techoops.fr/uploads/images/gallery/2025-04/UYpimage.png)

ensuite on join le domaine avec realm join -U "votrecompteAD" "nom de domaine de l'ad"

erreur normal:

[![image.png](https://book.techoops.fr/uploads/images/gallery/2025-04/scaled-1680-/pVNimage.png)](https://book.techoops.fr/uploads/images/gallery/2025-04/pVNimage.png)

il faut installer des outils supplémentaire:

apt update  
apt install packagekit

ensuite on a juste a rejoindre le domaine avec nos info :

[![image.png](https://book.techoops.fr/uploads/images/gallery/2025-04/scaled-1680-/Qaximage.png)](https://book.techoops.fr/uploads/images/gallery/2025-04/Qaximage.png)

[![image.png](https://book.techoops.fr/uploads/images/gallery/2025-04/scaled-1680-/xElimage.png)](https://book.techoops.fr/uploads/images/gallery/2025-04/xElimage.png)

On a bien rejoint le domaine !