Per Gunnarsson
2023-Dec-15 21:53 UTC
[Samba] Can't connect to CUPS printer from Windows 11
Hello! I am trying to set up samba for file sharing and as a print server. I can connect to the file shares from Windows 11, but the printer does not work. I have tried as far as I could understand https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Print_Server and I have added the Group Policy Object mentioned in the bottom of that page. The printer works over CUPS and bonjour. The samba and CUPS machine runs as? 4.17.8-Raspbian I haven't found much in the log files. My smb.conf: [global] ?? workgroup = WORKGROUP local master = yes preferred master = yes ?? interfaces = 127.0.0.0/8 enxb827ebe6aede domain master = yes wins support = yes dns proxy = yes hostname lookups = yes name resolve order = wins lmhosts host bcast smb ports = 445 139 138 137 ?? log file = /var/log/samba/log.%m printcap = CUPS printing = CUPS load printers = no ?? max log size = 1000 ?? logging = file ?? panic action = /usr/share/samba/panic-action %d ?? server role = standalone server ?? obey pam restrictions = yes ?? unix password sync = yes ?? passwd program = /usr/bin/passwd %u ?? passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . ?? pam password change = yes ?? map to guest = bad user [homes] ?? comment = Home Directories ?? browseable = no ?? read only = yes ?? create mask = 0700 ?? directory mask = 0700 ?? valid users = %S [HP_DeskJet_2700_series] use client driver = yes comment = All Printers browseable = yes path = /var/tmp printable = yes guest ok = yes read only = yes create mask = 0700 printer name = HP_DeskJet_2700_series [print$] comment = Printer Drivers path = /var/lib/samba/printers browsable = yes read only = no guest ok = yes writeable = yes directory mask = 0775 create mask = 0775 write list = @lpadmin, root admin users = @lpadmin, root [samba-share] comment = Samba on Debian valid users = user1, user2 path = /my/folder read only = no writable = yes guest ok = no hosts allow = 192.168.90.0/24 10.8.0.0/24 127.0.0.1 browsable = yes [musik] comment = Samba on Debian valid users = user1, user2 path = /my/folder read only = yes guest ok = no hosts allow = 192.168.90.0/24 10.8.0.0/24 127.0.0.1 browsable = yes create mask = 0755 [mappen] comment = Samba on Debian valid users = user1, user2 path = /my/folder writable = yes guest ok = no hosts allow = 192.168.90.0/24 10.8.0.0/24 127.0.0.1 browsable = yes create mask = 0755
Per Gunnarsson
2024-Jun-18 22:04 UTC
[Samba] Can't connect to CUPS printer from Windows 11 (update)
There was a missing registry key on my Windows 11. Some Thomas Forde suggested: Registry Setting for the above GPO [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\RPC] There are 2 values that can be configured: |RpcUseNamedPipeProtocol| REG_DWORD 0: RpcOverTcp (default) 1: RpcOverNamedPipes After addind this to my registry with regedit, I could connect to my Samba printer using Windows 11 Regards, Per Gunnarsson Den 2023-12-15 kl. 22:53, skrev Per Gunnarsson via samba:> Hello! > > I am trying to set up samba for file sharing and as a print server. > I can connect to the file shares from Windows 11, but the printer does > not work. > > I have tried as far as I could understand > https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Print_Server > and I have added the Group Policy Object mentioned in the bottom of > that page. > > The printer works over CUPS and bonjour. > > The samba and CUPS machine runs as? 4.17.8-Raspbian > I haven't found much in the log files. > > My smb.conf: > > > > [global] > > ?? workgroup = WORKGROUP > > local master = yes > preferred master = yes > > > > ?? interfaces = 127.0.0.0/8 enxb827ebe6aede > > domain master = yes > > wins support = yes > > > dns proxy = yes > > hostname lookups = yes > > > name resolve order = wins lmhosts host bcast > > smb ports = 445 139 138 137 > > > > > ?? log file = /var/log/samba/log.%m > > > printcap = CUPS > printing = CUPS > load printers = no > ?? max log size = 1000 > > ?? logging = file > > ?? panic action = /usr/share/samba/panic-action %d > > > ?? server role = standalone server > > ?? obey pam restrictions = yes > > ?? unix password sync = yes > > ?? passwd program = /usr/bin/passwd %u > ?? passwd chat = *Enter\snew\s*\spassword:* %n\n > *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . > > ?? pam password change = yes > > ?? map to guest = bad user > > > [homes] > ?? comment = Home Directories > ?? browseable = no > ?? read only = yes > ?? create mask = 0700 > ?? directory mask = 0700 > ?? valid users = %S > > > > > > [HP_DeskJet_2700_series] > > > use client driver = yes > comment = All Printers > browseable = yes > path = /var/tmp > printable = yes > guest ok = yes > read only = yes > create mask = 0700 > printer name = HP_DeskJet_2700_series > > > [print$] > > comment = Printer Drivers > path = /var/lib/samba/printers > browsable = yes > read only = no > guest ok = yes > writeable = yes > directory mask = 0775 > create mask = 0775 > write list = @lpadmin, root > admin users = @lpadmin, root > > > > > > [samba-share] > comment = Samba on Debian > valid users = user1, user2 > path = /my/folder > read only = no > writable = yes > guest ok = no > hosts allow = 192.168.90.0/24 10.8.0.0/24 127.0.0.1 > browsable = yes > > [musik] > comment = Samba on Debian > valid users = user1, user2 > path = /my/folder > read only = yes > guest ok = no > hosts allow = 192.168.90.0/24 10.8.0.0/24 127.0.0.1 > browsable = yes > create mask = 0755 > > [mappen] > comment = Samba on Debian > valid users = user1, user2 > path = /my/folder > writable = yes > guest ok = no > hosts allow = 192.168.90.0/24 10.8.0.0/24 127.0.0.1 > browsable = yes > create mask = 0755 > > >