How to samba : Windows shares in linux

Samba is a free software implementation of network file sharing application protocol (SMB/CIFS) of windows. It allows sharing of files, parallel port devices, printers in a network.

Some examples for using samba is given below.
  • Add a share

    • Edit the file /etc/samba.smb and append the following (modify according to your requirements)
      [Programs]
      path = /home/hash/Programs
      valid users = hash
      read only = no
      create mask = 0777
      directory mask = 0777
      [Collection]
      path = /home/hash/Store
      guest ok = yes
      read only = no

    • Restart samba server
      hash@ssl50:~$ sudo /etc/init.d/samba restart
      * Stopping Samba daemons
      * Starting Samba daemons


  • Adding a user
    • Adding the user hanoosh
      hash@ssl50:~$ sudo smbpasswd -a hanoosh
      New SMB password:
      Retype new SMB password:
      Added user hanoosh



0 comments: