Sharing an attached USB disk (Samba)

This recipe extends the default Samba configuration to include sharing a USB disk.

The previous recipe showed how to install Samba and set up basic file sharing. However, the Samba configuration used only shared files that are in the user's home directory. Other directories on the Raspberry Pi are not yet accessible via the SMB (CIFS) protocol.

This recipe extends the Samba configuration used in the previous recipe to include a new file share definition that points to a USB hard disk mounted on the Raspberry Pi.

After completing this recipe, the Raspberry Pi can be used as a file server for any computer that shares its files via the SMB (CIFS) protocol (for example, Windows, Mac, and Linux computers).

Getting ready ...

Get Raspberry Pi Networking Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.