Sunday, May 7, 2017

Setting up Samba on my Gizmo 2

As described in my previous blog I have setup my Gizmo 2 to become my NAS. Now it is time to enable Samba so I can access the volumes with my Windows machines.

Installation
  • yum install -y samba samba-client

Security
  • useradd pi
  • passwd pi
  • smbpasswd -a pi
  • smbpasswd -L -e pi
  • groupadd fastvol
  • groupadd safevol
  • usermod -a -G fastvol pi
  • usermod -a -G safevol pi

Permissions
  • chown -R pi:fastvol /mnt/fastvol
  • chown -R pi:safevol /mnt/safevol
  • chmod -R 0777 /mnt/fastvol
  • chmod -R 0777 /mnt/safevol
  • chcon -t samba_share_t /mnt/fastvol
  • chcon -t samba_share_t /mnt/safevol

Configuration
  • vi /etc/samba/smb.conf
[fastvol]
        path = /mnt/fastvol
        valid users = @fastvol
        writable = yes
        read only = no
        browsable = yes
        guest ok = no
        create mode = 0777
        directory mode = 0777

[safevol]
        path = /mnt/safevol
        valid users = @safevol
        writable = yes
        read only = no
        browsable = yes
        guest ok = no
        create mode = 0777
        directory mode = 0777

Start & enable service
  • systemctl restart smb
  • systemctl restart nmb
  • systemctl enable smb
  • systemctl enable nmb

Sources Samba Setup

No comments:

Post a Comment