Install samba
1 2 |
sudo apt-get install samba |
Configure sharings. Save your samba configuration:
1 2 |
mv /etc/samba/smb.conf /etc/samba/smb.conf.SAVE |
Put the folowing into a new /etc/samba/smb.conf file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
[global] ## Browsing/Identification ### workgroup = MYGROUP server string = Samba server (%h) netbios name = Serveur dns proxy = no #### Networking #### #interfaces = 192.168.0.15 #bind interfaces only = yes ### Access rights ### create mask = 0660 directory mask = 0770 #### Debugging/Accounting #### log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d ####### Authentication ####### security = user # ATTENTION A BIEN REMPLACER "groupe_principal" par le nom du groupe dont vous faites partie # (si vous êtes l'utilisateur principal, c'est également votre login) # et de rajouter les éventuels autres utilisateurs... #valid users = @guest, @smbgroup encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = no map to guest = bad user ############ Misc ############ socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192 usershare allow guests = no ############ SHARING 1 ############ [MOVIES] comment = Movies dir path = /mnt/movies browsable = yes guest ok = no read only = no create mask = 0755 ############ SHARING 2 ############ [DOCUMENTS] comment = Documents dir path = /mnt/documents browsable = yes guest ok = no read only = no create mask = 0755 |
and modify – workgroup – server string – interface (put the IP of your NAS here if you want to restrict the samba listing interface) – the name of your sharings ([MOVIES], …) and the path inside them. Restart samba to make …