Bug 2358 - [printers] -share incorrectly added to hosts with include %L
[printers] -share incorrectly added to hosts with include %L
Status: RESOLVED INVALID
Product: Samba 3.0
Classification: Unclassified
Component: Printing
3.0.11
All Linux
: P3 normal
: none
Assigned To: Gerald (Jerry) Carter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-18 03:10 UTC by Jukka Merinen
Modified: 2006-04-15 03:44 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jukka Merinen 2005-02-18 03:10:58 UTC
I have the following configuration: the Samba server has two netbios names
'alpha' and 'beta':

   netbios name = alpha
   netbios aliases = beta

The hosts use a different configuration by 

   include = /etc/samba/smb.conf.%L

There is one printer ('hp2') installed on CUPS.

[printers] -share is added in smb.conf.alpha, but all the printers appear
incorrectly also when accessing beta. The alpha/beta separation works ok with
file shares. Expected behavior: The printers would appear only on 'alpha'.

Below is attached in-line the following files: smb.conf, smb.conf.alpha,
smb.conf.beta. I can later attach level 10 debug log if necessary.



smb.conf:

[global]

   interfaces = 10.10.15.62
   bind interfaces only = yes
   smb ports = 139

   netbios name = alpha
   netbios aliases = beta

   workgroup = serv

log file = /var/log/samba/debug.log

log level = 10

security = share


load printers = yes
printing = cups
printcap name = cups
#EOF

smb.conf.alpha:
[alphatest]
   path = /tmp/
   public = yes

[printers]
   path = /tmp
   printable = yes
#EOF

smb.conf.beta:
[betatest]
   path = /tmp/
   public = yes
#EOF

Example session:

britney:~# smbclient -L alpha
Password:
Domain=[SERV] OS=[Unix] Server=[Samba 3.0.11]

        Sharename       Type      Comment
        ---------       ----      -------
        alphatest       Disk
        IPC$            IPC       IPC Service (Samba 3.0.11)
        ADMIN$          IPC       IPC Service (Samba 3.0.11)
        hp2             Printer   hp2
Domain=[SERV] OS=[Unix] Server=[Samba 3.0.11]

        Server               Comment
        ---------            -------
        ALPHA                Samba 3.0.11
        BETA                 Samba 3.0.11

        Workgroup            Master
        ---------            -------
        SERV


britney:~# smbclient -L beta
Password:
Domain=[SERV] OS=[Unix] Server=[Samba 3.0.11]

        Sharename       Type      Comment
        ---------       ----      -------
        betatest        Disk
        IPC$            IPC       IPC Service (Samba 3.0.11)
        ADMIN$          IPC       IPC Service (Samba 3.0.11)
        hp2             Printer   hp2
Domain=[SERV] OS=[Unix] Server=[Samba 3.0.11]

        Server               Comment
        ---------            -------
        ALPHA                Samba 3.0.11
        BETA                 Samba 3.0.11

        Workgroup            Master
        ---------            -------
        SERV
Comment 1 Jukka Merinen 2006-04-15 03:44:32 UTC
I revised this bug. It's not a bug, it's a configuration mistake. Adding the printers is caused by "load printers = yes" which is correct and documented behavior.