Poletto Davide
2003-Jun-27 08:07 UTC
[Samba] Samba Virtual Servers (Host aliases) configuration problem
Hi, I need to create one or more NetBIOS host alias of my unique SAMBA server version 2.27 which is running on a RedHat Linux 8.0 box acting as a simple file-sharing machine for our WORKGROUP. I need that my clients see three differents host more than the real fileserver; I think the scope of virtual server was based on which virtual host I'll contact I'll see the relative share: so everyone will see FILESERVER share, everyone who conntacts ALIAS1 will see ALIAS1 share (and FILESERVER share due to include mechanism...) and so on. This is part of my actual "smb.conf" file on /etc/samba directory: [global] workgroup = WORKGROUP netbios name = FILESERVER netbios aliases = ALIAS1 ALIAS2 ALIAS3 include = /etc/samba/smb.conf.%L server string = SAMBA %v on %h [SHARE] comment = FILESERVER share path = /home/share printable = no writable = yes valid users = @filesharing write list = @filesharing ...then I have edited three separate smb.conf.%L (%L substituted with each alias NetBIOS name) under /etc/samba directory: smb.conf.ALIAS1 smb.conf.ALIAS2 smb.conf.ALIAS3 each of theese configuration files has only a share section (No [global] section) with this style: smb.conf.ALIAS1 has [ALIAS1] comment = ALIAS1 share path = /home/share_alias1 printable = no writable = yes valid users = @filesharing write list = @filesharing smb.conf.ALIAS2 has [ALIAS2] comment = ALIAS2 share path = /home/share_alias2 printable = no writable = yes valid users = @filesharing write list = @filesharing and so on for ALIAS3. It doesn't work properly because it seems that the variable %L will not "set" as it would by the client connect request. Each client inside my workgroup see effectively three different hosts (virual hosts) ALIAS1, ALIAS2 and ALIAS3 plus the real fileserver FILESERVER but if I'll try to connect with ALIAS1 I'll see only the /home/share of SHARE and not this one plus/and ALIAS1 /home/share_alias1 of ALIAS1! The same if I'll trying to connect to ALIAS2 or ALIAS3... It seems that include mechanism doesn't work properly. Could anyone help me setting up this configuration files properly? Davide Poletto