Beckett, Martin" <martin.beckett@adaptive-screening.com> wrote:
> I want to have a single samba server with file shares under multiple server
> names.
>
> eg: \\fileserver\share
> \\appserver\\share
> \\backup\\share
>
> All being the same physical machine, the idea being that as the system
> expands these can be moved
> onto separate machines as demand increases without having to change all the
> clients.
Ok - here's how you do that. As another email mentioned, it is done
using the "netbios aliases" option *AND* - assuming the shares are
different for each server - the "include" directive in the smb.conf
file.
Here's an example that has two "virtual" samba servers showing up
in the
workgroup/domain, with different shares. To do this, we will use 3
files: smb.conf, server1.conf, and server2.conf. The important thing
to note is the usage of the "netbios aliases" directive, and the
placement of the "include" directive at the end of the [global]
section
of smb.conf. We use the substitution parameter %L, which gets replaced
by the NETBIOS name the server is being accessed as.
smb.conf
--------
[global]
netbios name = SERVER1
netbios aliases = SERVER2
.
.
<other options that you want to be global on BOTH samba servers>
.
.
include = %L.conf
Now, we want to put share definitions that we want to be UNIQUE per
virtual Samba server into the server specific file we are including at
the bottom of the [global] section of smb.conf. You could include
shares you want to be on ALL servers - such as [homes] and [printers] -
in the main smb.conf file.
Note as well that you could START the server specific files with more
global options. For example, you may want one virtual server to be
accessed using share-level security, and the other with user-level
security.
Here are some server specific share definitions.
server1.conf
------------
[apps]
comment = Shared Application files
path = /shared/apps
read only = No
guest ok = Yes
guest only = Yes
server2.conf
------------
[data]
comment = Shared Data files
path = /shared/data
read only = No
guest ok = No
guest only = No
Anyway - gotta go. hope this gets you going in the right direction!
--
/-------------------------------------\
| Jim Morris | jim@morris-world.com |
\-------------------------------------/