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 ...

Get Mastering Ubuntu Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.