You can restrict a share from being in a browse list by using the
browseable
option. This boolean option prevents a share from being seen in the Network Neighborhood at all. For example, to prevent the
[data]
share from the previous chapter from being visible, we could write:
[data]
path = /home/samba/data
browseable = no
guest ok = yes
comment = Data Drive
volume = Sample-Data-Drive
writeable = yes
Although you typically don't want to do this to an ordinary disk share, the browseable option is useful in the event that you need to create a share with contents that you do not want others to see, such as a
[netlogin]
share for storing logon scripts for Windows domain control (see Chapter 6,
Users, Security, and Domains for more information on logon scripts).
Another example is the
[homes]
share. This share is often marked non-browsable so that a share named
[homes]
won't appear when its machine's resources are browsed. However, if a user
alice
logs on and looks at the machine's shares, an
[alice]
share will appear under the machine. What if we wanted to make sure
alice
's share appeared to everyone before she logs in? This could be done with the global
auto
services
option. This option preloads shares into the browse list to ensure that they are always visible:
[global]
...
auto services = alice
...