Book Image

Learning RHEL Networking

By : Andrew Mallett, Adam Miller
Book Image

Learning RHEL Networking

By: Andrew Mallett, Adam Miller

Overview of this book

Table of Contents (18 chapters)
Learning RHEL Networking
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring file shares in Samba


We have seen the major feature of file sharing that Samba enables with the user's home directories. Although this feature is enabled by default, we will also need to create our own file shares by adding our own sections to smb.conf. On the Red Hat server, we have the /data directory that we worked with during btrfs in Chapter 5, Implementing btrfs. If we need to share this to our Windows-based clients, then Samba is the tool we will use.

We can edit the smb.conf file with root privileges and add a new section to the configuration. The attributes that we use in the section control the access and use of the share. At the very least, we require the path attribute for the share to be meaningful. For a full list of options, the man pages for the smb.conf file will help. The following screenshot shows the share definition that we have added for the /data directory on the server:

The read list restricts reading data from the share to listed users; in this case, we...