[SAMBA AC DC][Printing issues] A lot of errors when configuring printing in samba 4.0.3

Chirana Gheorghita Eugeniu Theodor office at adaptcom.ro
Thu Feb 28 14:58:04 MST 2013


Hello,
I just confuguret printing in samba 40.3 and is not working as expected:
Just using the default howto config samba complains about addprinter
command.
I added the addprinter commnad from sources examples lik this:

        workgroup = OFFICE
        realm = OFFICE.AVIAMOTORS.RO
        netbios name = CERBERUS
        server role = active directory domain controller
        dns forwarder = 10.124.112.2
        log level = 2
        debuglevel = 2
        load printers = yes
        addprinter command = /samba/bin/smbaddprinter.pl

smbaddprinter.pl:
@argv = @ARGV;

# take in args
my $lpname=shift(@argv);        # printer name
my $shname=shift(@argv);        # share name    -> used for CUPS queue name
my $portname=shift(@argv);      # port name
my $drivername=shift(@argv);    # driver name   -> used for CUPS description
my $location=shift(@argv);      # location      -> used for CUPS device URI
my $win9x=shift(@argv);         # win9x location

#check for location syntax
#if no protocol specified...
if ($location !~ m#:/#){
        #assume an lpd printer
        $location = "lpd://".$location;
}
#else, simply pass the URI on to the lpadmin command

#run the cups lpadmin command to add the printer
system("/usr/sbin/lpadmin -p $shname -D \"$drivername\" -E -v $location");

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

[print$]
    comment = Point and Print Printer Drivers
    path = /samba/var/print
    read only = No


Now when I add a driver to samba all is ok, driver gets uploaded but when I
add a new printer from //server/printers it tells error access denied and
the printer does not show. After samba restart printer shows but no driver
associated. I have to click properties on the printer, select a drives,
more errors, click ok and if selecting properties again .. the driver is
there.

Also delete printer does not work neither delete driver.
When trying to configure the printer port to add the ip of the printer it
shows this:

/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
DriverPolicy: WERR_BADFILE
/samba/sbin/smbd: 10.124.112.23 (ipv4:10.124.112.23:60334) closed
connection to service profiles
/samba/sbin/smbd: smbd_smb2_request_incoming: client read error
NT_STATUS_CONNECTION_RESET
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printColor: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printDuplexSupported: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printStaplingSupported: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printPagesPerMinute: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printMaxResolutionSupported: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printMediaReady: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printColor: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printDuplexSupported: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printStaplingSupported: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printPagesPerMinute: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printMaxResolutionSupported: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
printMediaReady: WERR_BADFILE
/samba/sbin/smbd: _spoolss_OpenPrinterEx: Cannot open a printer handle for
printer \\cerberus



creating printer:


/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: find_printer_index_by_hnd: Printer handle not found:
find_printer_index_by_hnd: Printer handle not found: close_printer_handle:
Invalid handle (OTHER:13369:13372)
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
DriverPolicy: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
EMFDespoolingSetting: WERR_BADFILE
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
ForceClientSideRendering: WERR_BADFILE
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: smbd_smb2_request_incoming: client read error
NT_STATUS_CONNECTION_RESET
/samba/sbin/smbd: Could not find child 13376 -- ignoring
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists
/samba/sbin/smbd: winreg_create_printer: Skipping,
SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\HP_P2050
already exists

also these error appear a lot:

/samba/sbin/smbd: spoolss_connect_to_client: unable to open the spoolss
pipe on machine MANAGEMENTDC.office.aviamotors.ro. Error was :
NT_STATUS_ACCESS_DENIED.
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
EMFDespoolingSetting: WERR_BADFILE
/samba/sbin/smbd: spoolss_connect_to_client: unable to open the spoolss
pipe on machine MANAGEMENTDC.office.aviamotors.ro. Error was :
NT_STATUS_ACCESS_DENIED.
/samba/sbin/smbd: winreg_get_printer_dataex: Could not query value
ForceClientSideRendering: WERR_BADFILE

Anyoane solved this?
-- 
________________________________________
Cu stima/Best regards/Mit freundlichen Grüßen,

Chirana-Gheorghita Eugeniu-Theodor
Bucharest, Romania

e-mail : office at adaptcom.ro
mobile: 0743 698721
            0747 447675


More information about the samba-technical mailing list