# Mount un partage windows CIFS automatique

Je te transmets ci-dessous une procédure pour reproduire cette configuration sur les autres serveurs.  
   
Procédure :   
<span style="color: rgb(230, 126, 35);">yum install cifs-utils </span>  
<span style="color: rgb(230, 126, 35);">mkdir /data</span>  
<span style="color: rgb(230, 126, 35);"> mount -t cifs //idfm-ob.fr/idfm-nas-hprod/ortelius-rec /data -o username=ortelius-svc-rec-srv</span>  
<span style="color: rgb(224, 62, 45);"> Rentrer le password de ortelius demander sur le shell</span>  
<span style="color: rgb(45, 194, 107);"><span style="color: rgb(230, 126, 35);">df -h</span> </span>pour voir si il est bien monté

Création de la partition en automatique :   
<span style="color: rgb(45, 194, 107);">vi /etc/cifs-credentials</span>  
 username=\*\*\*\*\*\*\*\*  
password=\*\*\*\*\*\*\*\*

save &amp; quit   
   
<span style="color: rgb(230, 126, 35);">chmod 600 /etc/cifs-credentials</span>  
   
<span style="color: rgb(230, 126, 35);">vi /etc/fstab</span> : rajouter cette conf suivante pour que le reboot soit automatique[![image.png](https://cavallone.fr/uploads/images/gallery/2024-10/scaled-1680-/VwTfM8saRG1eWPDZ-image.png)](https://cavallone.fr/uploads/images/gallery/2024-10/VwTfM8saRG1eWPDZ-image.png)

<span style="color: rgb(45, 194, 107);">//idfm-ob.fr/idfm-nas-hprod/ortelius-rec /data cifs credentials=/etc/cifs-credentials,rw,vers=3.0,nofail,noauto,x-systemd.automount 0 0 </span>

  
Save &amp; quit   
   
reboot monter automatiquement :

[![image.png](https://cavallone.fr/uploads/images/gallery/2024-10/scaled-1680-/I9vhhuOlLdUYpQt8-image.png)](https://cavallone.fr/uploads/images/gallery/2024-10/I9vhhuOlLdUYpQt8-image.png)