[Samba] SAMBA / CUPS Printserver

Jack Downes jax at nwmt.us
Mon Jan 17 11:39:24 MST 2011


Well, not perfectly.  I don't know what this issue is, however the way I
configured my Samba server doesn't quite get along with Windows APW for
adding printers.  I don't know what I've missed but my symptoms are:

I step through the APW, Keep the existing driver, no test print page,
hit Finish.  Upon return of the script smbaddprinter.pl, I get an Access
Denied message.  You can see the logs here:
http://nwmt.us/log_smbd_single_click_Finish.txt

However, if I dismiss that Access Denied message, wait some 5 to 10
seconds and hit Finish again, the printer will be loaded correctly - the
correct port, driver, comment, location are set as well.  So, it's
doable, just annyoying.
The logs for this can be seen here:
http://nwmt.us/log_smbd_single_click_wait_10_click_again_Finish.txt

when these logs were created, the following log level was used:
log level = 0 passdb:10 auth:10 printdrivers:10 sam:10

so, it might not be enough information, I don't know.

My slightly updated config.  I build this on swat as much as possible,
and edit by hand only when I think it necessary.
freecups# cat smb.conf
# Samba config file created using SWAT
# from UNKNOWN (10.6.120.162)
# Date: 2011/01/17 03:55:12

[global]
    display charset = UTF-8
    workgroup = KRH
    realm = KRH.INT
    server string = Samba Server
    security = ADS
    password server = kal-dc3.krh.int, kal-dc4.krh.int, kal-dc2.krh.int, *
    ntlm auth = No
    client NTLMv2 auth = Yes
    syslog = 0
    log level= 3
    log file = /var/log/samba/log.%m
    debug prefix timestamp = Yes
    max protocol = SMB2
    unix extensions = No
    max open files = 20000
    socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384
    hostname lookups = Yes
    printcap name = /usr/local/etc/printcap
    addprinter command = /usr/local/sbin/smbaddprinter.pl
    deleteprinter command = /usr/local/sbin/smbdelprinter.pl
    local master = No
    domain master = No
    dns proxy = No
    wins server = 10.6.1.21
    utmp = Yes
    host msdfs = No
    idmap uid = 10000-20000
    idmap gid = 10000-20000
    winbind enum users = Yes
    winbind enum groups = Yes
    winbind cache time = 300
    winbind use default domain = Yes
    winbind refresh tickets = Yes
    cups options = raw
    force printername = Yes
    wide links = Yes

[homes]
    comment = Home Directories
    read only = No
    browseable = No

[printers]
    comment = All Printers
    path = /var/spool/samba
    printable = Yes
    browseable = No

[print$]
    comment = Where the printer drivers are kept
    path = /home/printserver/drivers
    write list = root, jax, KRH\jdown
    force user = printserver
    force group = printserver
    create mask = 0666
    security mask = 0666
    directory mask = 0777



Jack Downes wrote:
> To answer my own question/problem here in case anyone else needs to
> know...
>
> Turns out I had a permission issue with where I was storing the
> drivers. I had that owned by printserver:printserver, and the user I
> was attempting to write with was KRH\jdown.
>
> So... it ended up being a perms issue. I've since fixed this, and all
> is working correctly now!
>
> thanks,
> Jack
>
>
>
> On 01/14/2011 13:15, Jack Downes wrote:
>> Aw, geez, forgot to mention essentials:
>> Samba 3.5.6
>> Freebsd 8.1
>> Cups 1.4.6
>>
>> smb.conf:
>> [global]
>>         log level = 6
>>         workgroup = KRH
>>         realm = KRH.INT
>>         netbios aliases = freecups-2 freecups samba
>>         server string = FreeBSD Server %v
>>         security = ADS
>>         password server = kal-dc3.krh.int, kal-dc4.krh.int,
>> kal-dc2.krh.int, *
>>         ntlm auth = No
>>         client NTLMv2 auth = Yes
>>         smb ports = 139
>>         printcap cache time = 10
>>         printcap name = cups
>>         cups server = localhost
>>         addprinter command = /usr/local/sbin/smbaddprinter.pl
>>         deleteprinter command = /usr/local/sbin/smbdelprinter.pl
>>         local master = No
>>         domain master = No
>>         browse list = No
>>         wins server = 10.6.1.21
>>         idmap uid = 10000-20000
>>         idmap gid = 10000-20000
>>         winbind cache time = 300
>>         winbind use default domain = Yes
>>         winbind refresh tickets = Yes
>>         guest ok = Yes
>>         cups options = raw
>>
>> [homes]
>>         comment = PDF files
>>         read only = No
>>         browseable = No
>>         browsable = No
>>
>> [printers]
>>         comment = All Printers
>>         path = /var/spool/samba
>>         printable = Yes
>>         browseable = No
>>         browsable = No
>>
>> [print$]
>>         comment = Printer Drivers
>>         path = /usr/home/KRH_drivers
>>         write list = root, printserver,KRH\jdown
>>         force user = printserver
>>         force group = printserver
>>         guest ok = No
>>
>>
>> I kind of get the impression that printing is either not important to
>> this list, or not many people find it difficult to sort out at all. 
>> If you are in the second category, please let me know where I'm going
>> wrong, or what further information I should post to make the problem
>> a bit clearer.
>>
>> thanks,
>> Jack
>>
>> On 01/14/2011 12:40, Jack Downes wrote:
>>> Okay, I've got some progress now.  Have fairly decent printserver
>>> working.  I've been able to reproduce the same postive and negative
>>> results in two physical servers and now (finaly destination) a
>>> vmware server.
>>>
>>> What's working:
>>> ADS integration, this is a domain member
>>> Printer driver installation (for a few drivers)
>>> Printer installation / removal
>>> Printing.
>>>
>>> What's not working:
>>> Most of the time, it will not let me install new printer drivers. 
>>> In particular I'm not having any luck getting HP's Universal Print
>>> Driver v5.2 to load.
>>>
>>> Everything is close, simpler drivers work well.  I'm going to
>>> attempt to get this driver to load on another samba server 3.4.9 and
>>> then copy the tdb information over.  Not sure at all if this will work.
>>
>



More information about the samba mailing list