Catnoo
Notes de paramétrage de postes de travail, et autres vicissitudes ...

Accueil > Matériel divers > Raspberry PI > raspberry - partage samba

raspberry - partage samba

jeudi 18 septembre 2014, par Lucien-Henry

prérequis : avoir une clé USB qui sera montée automatiquement.
Eventuellement ... un petit


ln -s /media/LADITECLE /media/cleusb
sudo chown pi:pi /media/cleusb

Préparation de Samba

sudo apt-get install samba samba-common-bin
sudo cp -ifr /etc/samba/ /etc/samba_init
sudo adduser guest —home=/home/public —shell=/bin/false —disabled-password
sudo mkdir /media/cleusb/partage
sudo chown pi:pi /media/cleusb/partage
vi /etc/samba/smb.conf

## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
####### Authentication #######
security = user


à la fin du dit fichier smb.conf


[Partage]
comment = Partage
read only = no
writable = yes
locking = no
path = /media/DISQUE/partage
guest ok = yes
force user = pi


Relancer le service Samba :


sudo service samba restart

Adaptation du scanner réseau

modifier les paramètres de dépôt de fichier

Le répertoire magique est alors : \\raspberrypi\partage\

Modifications après migration vers Debian 8.0 Jessie

Il faut redéclarer les répertoires dans /etc/samba/smb.conf

path = /media/cleusb/partage/


Le répertoire par défaut de montage a été visiblement supprimé, il faut le reconstruire.

mkdir /meda/cleusb


Puis déclarer le montage automatique dans /etc/fstab montage d’une clé avec une utilisateur :


pi@raspberrypi /media/cleusb/partage $ cat /etc/fstab
proc /proc proc defaults 0 0

#tmpfs /var/run tmpfs defaults 0 0
#tmfps /var/lock tmpfs defaults 0 0
tmpfs /var/crash tmpfs defaults,noatime,nodiratime 0 0
tmpfs /var/log tmpfs defaults,noatime,nodiratime 0 0
tmpfs /var/tmp tmpfs defaults,noatime,nodiratime 0 0
tmpfs /tmp tmpfs defaults,noatime,nodiratime 0 0

/dev/mmcblk0p1 /boot vfat defaults,noatime,nodiratime 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime,nodiratime 0 1
/dev/sda1 /media/cleusb vfat user,uid=1000,gid=1000 0 0

tmpfs /home/pi/.dbus tmpfs uid=pi,gid=pi,defaults,noatime,nodiratime 0 0
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swapon for that
pi@raspberrypi /media/cleusb/partage $

installation du 13/04/2016

Partager un dossier debian / raspberry pi

Sous Jessie toute fraîche, tout court :
apt-get install samba
Bien vérifier dans /etc/samba/smb.conf :

[global]
workgroup = WORKGROUP
security = share
share modes = yes

[public]
path = /Partage
public = yes
writable = yes
comment = smb share
printable = no
guest ok = yes

Puis reboot.

Windows 10 reconnait sans aucun problème via un petit F5.

Liens divers

Samba Tutorial
Samba Optimizations
Samba performances tuning
Samba pour CentOS

Voir en ligne : juste partager

SPIP | | Plan du site | Suivre la vie du site RSS 2.0
Habillage visuel © digitalnature sous Licence GPL