when using 'virtual servers' implemented with 'netbios name', 'netbios alias' the %L parameter in the include is not being resolved correctly. For example, with the following config files: /etc/samba/smb.conf: #Global parameters [global] workgroup = mshome netbios name = nas2 netbios aliases = server1 server2 security = share server string = Samba Server %L log file = /var/log/samba/%L.%m.log log level = 10 max log size = 50 preferred master = yes include = /etc/samba/%L.conf /etc/samba/nas2.conf [data] comment = data browseable = yes path = /data force user = nobody force group = nobody read only = No guest ok = Yes /etc/samba/server1.conf [Video] comment = Video files browseable = yes path = /data/Video force user = nobody force group = nobody read only = No guest ok = Yes /etc/samba/server2.conf [Music] comment = Music files browseable = yes path = /data/Audio/Music force user = nobody force group = nobody read only = No guest ok = Yes starting smb and using: smbclient -L server2 -U% the 'data' share is listed, not the 'music' share. A log file /var/log/samba/server2.nas2.log is created indicating the netbios alias has been used.
Created attachment 1284 [details] log file
Created attachment 1285 [details] log file
Created attachment 1286 [details] log file
Created attachment 1287 [details] log file
Created attachment 1288 [details] smbd.log
Created attachment 1289 [details] nmbd.log
Additional steps to reproduce issue: using the provided config files, starting smb and attempting a connect fails: $ smbclient //server2/Music Password: Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.10-1.fc2] tree connect failed: NT_STATUS_BAD_NETWORK_NAME the logs from this session were attached for reference.
Adding the global configuration item 'smb ports = 139' solves this issue. The default value for the ports that are listened on for SMB traffic. Win2K and later send on 445 which bypasses any netbios operations (such as the session request that contains the netbios called name which is used for %L). You could also achieve similar virtual host functionality by using a multi-homed server (even virtual interfaces) and the %i variable in smb.conf
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.