logo rss

Configurer un partage Samba sans mot de passe sur Debian

Intro

Dans certaines situations, il peut être utile de disposer d'un partage qui ne nécessite pas de mot de passe pour y accéder et donc ouvert à tous. Nous allons voir ici comment mettre en place un serveur Samba sur Debian, accessible sans authentification.

Configuration

  • OS : Debian GNU/Linux 10 (buster)
  • samba : 4.9.5

Installation

root@host:~# apt-get update && apt-get install samba

Configuration de Samba

  • Création du dossier partagé :
root@host:~# mkdir /share
root@host:~# chown -R nobody:nogroup /share/
root@host:~# chmod -R 777 /share/
  • Éditer le fichier /etc/samba/smb.conf :
[global]
   workgroup = WORKGROUP
   server string = serv01
   security = user
   map to guest = bad user
[share]
   browseable = yes
   path = /share
   read only = no
   guest ok = yes
   create mask = 777
  • Vérification de la configuration et redémarrage des services :
root@host:~# testparm
root@host:~# systemctl restart smbd; systemctl restart nmbd
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

adresse mail de contact