All other users can browse the directory because of the browseable =
yes entry, but only mhelmke can write to the directory. Any files created by
ahudson in the directory give ahudson full permissions, but no one else
will have access to these files. This is the same as setting permissions with the
chmod command. Again, there are numerous options, so you can be as
creative as you want when developing sections.
Setting Global Samba Behavior with the [global] Section
The [global] section establishes configuration settings for all of Samba. If
a given parameter is not specifically set in another section, Samba uses the
default setting in the [global] section. The [global] section also sets
the general security configuration for Samba. The [global] section is the
only section that does not require the name in brackets.
Samba assumes that anything before the first bracketed section not labeled
[global] is part of the global configuration. (Using bracketed headings in
/etc/samba/smb.conf makes your configuration file more readable.)
The following sections discuss common Samba settings to share directories
and printers. You will then see how to test your Samba configuration.
Sharing Home Directories Using the [homes] Section
The [homes] section shares Ubuntu /home directories for the users. The
/home directory is shared automatically when a user’s Windows computer
connects to the Linux server holding the /home directory. The one problem
with using the default configuration is that the users see all the configuration
files (such as .profile and other files with a leading period in the
filename) that they normally wouldn’t see when logging on through Linux.
One quick way to avoid this is to include a path option in the [homes]
section. To use this solution, any user who requires a Samba share of his or
her /home directory needs a separate “home directory” to act as the
Windows /home directory.
This setting specifies that the directory named share under each user’s
directory is the shared Samba directory. The corresponding manual
smb.conf setting to provide a separate “home directory” looks like this:
Click here to view code image
[homes]
comment = Home Directories
path = /home/%u/share