Sharing files with Windows users using Samba
In this section, I'll walk you through setting up your very own Samba file server. I'll also go over a sample configuration to get you started so that you can add your own shares.
First, we'll need to make sure that the samba
package is installed on our server:
# apt-get install samba
When you install the samba
package, you'll have a new daemon installed on your server, smbd
. The smbd
daemon will be automatically started and enabled for you. You'll also be provided a default configuration file for Samba, located at /etc/samba/smb.conf
. For now, I recommend stopping Samba since we have yet to configure it:
# systemctl stop smbd
On older servers, you can stop Samba with the following command (note that the name of the daemon is also different on older Ubuntu versions):
# /etc/init.d/samba stop
Since we're going to configure Samba from scratch, we should start with an empty configuration file. Let's back up the original file, rather than overwrite it...