Created attachment 17420 [details] Screenshot Windows Print Management Console After the upgrade to 4.16 from 4.15 the Windows Print Management Console does not list printers and drivers. See screenshots attached. If you click on "manage drivers"then all the drivers are listed. These commands can list printers and drivers without problems. rpcclient localhost -U "user" -c "enumdrivers" rpcclient localhost -U "user" -c "enumprinters" Also Upload of drivers fails. On the printserver nothing in the logs stands out. The system is a Rocky Linux 8.6 with the Sernet packages. Here is the smb.conf [global] netbios name = Printserver server string = Printserver security = ADS realm = HQ.DOMAIN-IT.DE workgroup = DOMAIN-02 max log size = 50000 disable netbios = yes smb ports = 445 server min protocol = SMB2 client min protocol = SMB2 #log level = 5 log level = 1 auth_audit:2 logging =syslog only kerberos method = secrets and keytab dedicated keytab file = /etc/krb5.keytab writeable =YES map acl inherit = yes store dos attributes = yes inherit acls = Yes username map = /etc/samba/smbusers interfaces = lo eth0 bind interfaces only = Yes ##idmap## # Default idmap config used for BUILTIN and local windows accounts/groups idmap config *:backend = tdb idmap config *:range = 1000000-2000000 # idmap config for domain DOMAIN-02 idmap config DOMAIN-02:backend = ad idmap config DOMAIN-02:range = 500-65555 idmap config DOMAIN-02:schema_mode = rfc2307 idmap config DOMAIN-02:unix_nss_info = yes winbind use default domain = Yes winbind offline logon = yes winbind refresh tickets = yes machine password timeout = 604800 #Printing rpc_server:spoolss = external rpc_daemon:spoolssd = fork spoolss: architecture = Windows x64 min domain uid = 500 [printers] path = /var/spool/samba/ printable = yes printing = cups [print$] path = /srv/samba_printer_drivers/ read only = no
Created attachment 17421 [details] Screenshot Driver Management
I should also make it clear that printing works without problems.
try in smb.conf: min domain uid = 0
Tried that already. I am doing this with a user that is in the Print Operators group and that has the SePrintOperatorPrivilege granted.
What also might be interesting that an upgrade to 4.16.3 breaks printing completely. Downgrade to 4.15. fixes the printing but not Print Management Console. Is this working for others?
So we have setup a test machine (a clone of the original machine) and upgraded to 4.16.4. Here 4.16: cn@printsrv-test ~]$ rpcclient printsrv-test -U cn -c "enumprinters" Password for [DOM-02\cn]: No printers returned. [cn@printsrv-test ~]$ smbclient -L printsrv-test Password for [DOM-02\cn]: Sharename Type Comment --------- ---- ------- print$ Disk IPC$ IPC IPC Service (Printsrv-Test) SMB1 disabled -- no workgroup available Here 4.15: [cn@printsrv-test ~]$ rpcclient printserver -U "cn" -c "enumprinters" Password for [DOM-02\cn]: flags:[0x800000] name:[\\PRINTSERVER\XXX-MFP] description:[\\PRINTSERVER\XXX-MFP,XXXX PCL6 UniversalDriver VX.XX,XXXX XXXX XXX XXXX PCL X] comment:[XXXX XXX XX XXX PCL X] [cn@printsrv-test ~]$ smbclient -L printserver Password for [DOM-02\cn]: Sharename Type Comment --------- ---- ------- print$ Disk IPC$ IPC IPC Service (Printserver) XXX-MFP Printer XXXX XXX XX XXX PCL X SMB1 disabled -- no workgroup available According to the Wiki some things change for 4.16 (https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Print_Server) And we have set this with regards to spoolss: # for 4.15 only these rpc_server:spoolss = external rpc_daemon:spoolssd = fork spoolss: architecture = Windows x64 # additionally for Samba 4.16 rpcd_spoolss:idle_seconds=300 rpcd_spoolss:num_workers = 10 But still no joy. No printing from Windows and no printers listed with RPC client or smbclient. The commands above were run as normal user. Running them as Administrator does also not work (min domain uid = 0 is set).
Also confirmed on the mailing list: https://lists.samba.org/archive/samba/2022-August/241571.html Printing on 4.16.4 does not work.
So after some more trials I can say if I define every printer in the smb.conf. It is just the "auto detection" which is apparently not working. I also increased rpcd_spoolss:idle_seconds to 600 and still no printers. As we only have 9 printers I don't think a timeout is the issue here.
If you start smbd you need to trigger an rpc command in order to start rpc-spoolss. Once rpc-spoolss is started it scans cups for printers. The first time the command wont return anything as the printers list needs to be filled. Once it has been filled you should always get printers returned. You can use 'rpcclient ncacn_np:server -c 'enumprinters' to trigger the scanning. If you call it a second time after waiting a few seconds you should get printers returned. If not please provide log with log level = 10.
(In reply to Andreas Schneider from comment #9) Even after waiting for some time after the first command it does not work. I'll attach the lvl 10 debug logs.
I'll send the logs to you asn@samba.org because they may contain sensitive information.
Looks like it can't open the printers_list.tdb because of invalid options for tdb_open() [2022/08/19 08:39:55, 1, pid=13956, effective(0, 0), real(0, 0)] ../../lib/tdb_wrap/tdb_wrap.c:65(tdb_wrap_log) tdb(/var/cache/samba/printer_list.tdb): tdb_mutex_open_ok[/var/cache/samba/printer_list.tdb]: Can use mutexes only with MUTEX_LOCKING or NOLOCK [2022/08/19 08:39:55, 3, pid=13956, effective(0, 0), real(0, 0)] ../../lib/dbwrap/dbwrap_tdb.c:484(db_open_tdb) Could not open tdb: Invalid argument [2022/08/19 08:39:55, 0, pid=13956, effective(0, 0), real(0, 0)] ../../source3/printing/printer_list.c:58(get_printer_list_db) get_printer_list_db: Failed to open printer_list.tdb Volker any idea?
(In reply to Andreas Schneider from comment #12) > tdb_mutex_open_ok[/var/cache/samba/printer_list.tdb]: Can use mutexes only > with MUTEX_LOCKING or NOLOCK This message means that the existing printer_list.tdb has mutexes in its database format. I can't explain how this got there, but removing the existing file should get us across this particular error. Volker
SOLUTION: rm -f /var/cache/samba/printer_list.tdb or find /var -name printer_list.tdb -delete