software installation,

Samba File Server Setup

Follow Apr 24, 2016 · 3 mins read

Samba File Server

One of the most common ways to network Ubuntu and Windows computers is to configure Samba as a File Server. This section covers setting up a Samba server to share files with Windows clients.

The server will be configured to share files with any client on the network without prompting for a password

Installation

The first step is to install the samba package. From a terminal prompt enter:

sudo apt-get install samba

sudo apt-get install libpam-smbpass samba-dsdb-modules samba-vfs-modules python-samba samba-common-bin samba-common samba-libs nautilus-share libgnomevfs2-extra

sudo apt-get install cifs-utils samba-common system-config-samba winbind

sudo apt-get install libsmbcliet libsmbclient-dev libtevent0 libtalloc2

That’s all there is to it; you are now ready to configure Samba to share files.

Configuration

The main Samba configuration file is located in /etc/samba/smb.conf. The default configuration file has a significant amount of comments in order to document various configuration directives.

To add a new directory to share over the network.Add the following section to the configuration file

[share]
   comment = share
   browseable = yes
   path = /mnt/path
   guest ok = no
   read only = no
   writable=yes
   create mask = 0777
   valid users = klugadmin


  • browsable: enables Windows clients to browse the shared directory using Windows Explorer.
  • guest ok: allows clients to connect to the share without supplying a password.
  • create mask: determines the permissions new files will have when created.
  • read only: determines if the share is read only or if write privileges are granted.

Restart the samba service to enable the new configuration

sudo restart smbd
sudo restart nmbd

From a Windows client you should now be able to browse to the Ubuntu file server and see the shared directory. If your client doesn’t show your share automatically, try to access your server by its IP address, e.g. \192.168.1.1, in a Windows Explorer window

you can also map the network location using the following command

net use e: \\10.0.0.15\share

Samba File Server ———————

One of the most common ways to network Ubuntu and Windows computers is to configure Samba as a File Server. This section covers setting up a Samba server to share files with Windows clients.

The server will be configured to share files with any client on the network without prompting for a password

Installation

The first step is to install the samba package. From a terminal prompt enter:

sudo apt-get install samba

sudo apt-get install libpam-smbpass samba-dsdb-modules samba-vfs-modules python-samba samba-common-bin samba-common samba-libs nautilus-share libgnomevfs2-extra

sudo apt-get install cifs-utils samba-common system-config-samba winbind

sudo apt-get install libsmbcliet libsmbclient-dev libtevent0 libtalloc2

That’s all there is to it; you are now ready to configure Samba to share files.

Configuration

The main Samba configuration file is located in /etc/samba/smb.conf. The default configuration file has a significant amount of comments in order to document various configuration directives.

To add a new directory to share over the network.Add the following section to the configuration file

[share]
   comment = share
   browseable = yes
   path = /mnt/path
   guest ok = no
   read only = no
   writable=yes
   create mask = 0777
   valid users = klugadmin


  • browsable: enables Windows clients to browse the shared directory using Windows Explorer.
  • guest ok: allows clients to connect to the share without supplying a password.
  • create mask: determines the permissions new files will have when created.
  • read only: determines if the share is read only or if write privileges are granted.

Restart the samba service to enable the new configuration

sudo restart smbd
sudo restart nmbd

From a Windows client you should now be able to browse to the Ubuntu file server and see the shared directory. If your client doesn’t show your share automatically, try to access your server by its IP address, e.g. \192.168.1.1, in a Windows Explorer window

you can also map the network location using the following command

net use e: \\10.0.0.15\share

References

  • https://help.ubuntu.com/12.04/serverguide/samba-fileserver.html
  • https://www.howtoforge.com/samba-server-ubuntu-14.04-lts
  • http://askubuntu.com/questions/557001/permission-denied-when-sharing-folders

  • https://help.ubuntu.com/12.04/serverguide/samba-fileserver.html
  • https://www.howtoforge.com/samba-server-ubuntu-14.04-lts
  • http://askubuntu.com/questions/557001/permission-denied-when-sharing-folders
Written by