cups: Cannot connect to CUPS printer with basic authentication in Windows 10 1903
Hello, recently I upgrade my Win10 laptop from Win10 1809 to 1903 and suddenly find that I cannot connect to my CUPS printer anymore. When I try to add the printer manually in Control Panel, it always says “Windows couldn’t connect to the printer”. If I revert back to Win10 1809, it will work again. If I remove the Basic Authentication inside Get-Printer-Attributes, I can still add the printer in Win10 1903. Anyone has the same issue?
cups v2.3rc1 PS: cupsd.conf
LogLevel debug
MaxLogSize 1m
Port 631
Listen /run/cups/cups.sock
Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes
ServerAlias cups-test
<Location />
Order allow,deny
Allow all
</Location>
<Location /admin>
Order allow,deny
Allow all
</Location>
<Location /admin/conf>
Order allow,deny
Allow all
</Location>
<Policy default>
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
<Limit Get-Printer-Attributes>
AuthType Basic
Order allow,deny
Allow from 10.*.*.*
</Limit>
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Basic
Order allow,deny
Allow from 10.*.*.*
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Basic
Order allow,deny
Allow from 10.*.*.*
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Basic
Order allow,deny
Allow from all
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Basic
Order allow,deny
Allow from all
</Limit>
<Limit CUPS-Authenticate-Job>
Order allow,deny
Allow from all
</Limit>
<Limit All>
Order allow,deny
Allow from 10.*.*.*
</Limit>
</Policy>
PS: error_log
[19/Jun/2019:15:40:34 +0800] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
[19/Jun/2019:15:40:34 +0800] [Client 71] Server address is "10.92.5.15".
[19/Jun/2019:15:40:34 +0800] [Client 71] Accepted from 10.1.0.170:60428 (IPv4)
[19/Jun/2019:15:40:34 +0800] [Client 71] Waiting for request.
[19/Jun/2019:15:40:34 +0800] [Client 71] Connection now encrypted.
[19/Jun/2019:15:40:34 +0800] [Client 71] POST /printers/cups-test HTTP/1.1
[19/Jun/2019:15:40:34 +0800] cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
[19/Jun/2019:15:40:34 +0800] [Client 71] Read: status=200, state=6
[19/Jun/2019:15:40:34 +0800] [Client 71] No authentication data provided.
[19/Jun/2019:15:40:34 +0800] [Client 71] 1.0 Get-Printer-Attributes 11
[19/Jun/2019:15:40:34 +0800] Get-Printer-Attributes https://cups-test:631/printers/cups-test
[19/Jun/2019:15:40:34 +0800] cupsdIsAuthorized: username=""
[19/Jun/2019:15:40:34 +0800] [Client 71] Returning HTTP Unauthorized for Get-Printer-Attributes (https://cups-test:631/printers/cups-test) from 10.1.0.170
[19/Jun/2019:15:40:34 +0800] [Client 71] cupsdSendHeader: code=401, type="text/html", auth_type=1
[19/Jun/2019:15:40:34 +0800] [Client 71] WWW-Authenticate: Basic realm=\"CUPS\"
[19/Jun/2019:15:40:34 +0800] [Client 71] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
[19/Jun/2019:15:40:34 +0800] [Client 71] Closing connection.
[19/Jun/2019:15:40:34 +0800] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
[19/Jun/2019:15:40:34 +0800] [Client 71] Waiting for socket close.
[19/Jun/2019:15:40:34 +0800] [Client 71] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
[19/Jun/2019:15:40:34 +0800] [Client 71] Closing connection.
[19/Jun/2019:15:40:34 +0800] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
[19/Jun/2019:15:40:34 +0800] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
[19/Jun/2019:15:40:34 +0800] [Client 72] Server address is "10.92.5.15".
[19/Jun/2019:15:40:34 +0800] [Client 72] Accepted from 10.1.0.170:60429 (IPv4)
[19/Jun/2019:15:40:34 +0800] [Client 72] Waiting for request.
[19/Jun/2019:15:40:34 +0800] [Client 72] Connection now encrypted.
[19/Jun/2019:15:40:34 +0800] [Client 72] POST /printers/cups-test HTTP/1.1
[19/Jun/2019:15:40:34 +0800] cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
[19/Jun/2019:15:40:34 +0800] [Client 72] Read: status=200, state=6
[19/Jun/2019:15:40:34 +0800] [Client 72] No authentication data provided.
[19/Jun/2019:15:40:34 +0800] [Client 72] Read: status=100, state=6
[19/Jun/2019:15:40:34 +0800] [Client 72] 1.0 Get-Printer-Attributes 11
[19/Jun/2019:15:40:34 +0800] Get-Printer-Attributes https://cups-test:631/printers/cups-test
[19/Jun/2019:15:40:34 +0800] cupsdIsAuthorized: username=""
[19/Jun/2019:15:40:34 +0800] [Client 72] Returning HTTP Unauthorized for Get-Printer-Attributes (https://cups-test:631/printers/cups-test) from 10.1.0.170
[19/Jun/2019:15:40:34 +0800] [Client 72] cupsdSendHeader: code=401, type="text/html", auth_type=1
[19/Jun/2019:15:40:34 +0800] [Client 72] WWW-Authenticate: Basic realm=\"CUPS\"
[19/Jun/2019:15:40:34 +0800] [Client 72] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
[19/Jun/2019:15:40:34 +0800] [Client 72] Closing connection.
[19/Jun/2019:15:40:34 +0800] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
[19/Jun/2019:15:40:34 +0800] [Client 72] Waiting for socket close.
[19/Jun/2019:15:40:34 +0800] [Client 72] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
[19/Jun/2019:15:40:34 +0800] [Client 72] Closing connection.
[19/Jun/2019:15:40:34 +0800] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15
I can confirm the issue for clients using Windows with a version higher 1803. Since I couldn’t find anything in the changelogs regarding ipp or something else I also think it’s a bug in the latest windowsupdate.
For us it worked to allow all clients to access “Get-Printer-Attributes” and to grant access to the
<Location />
for all users without any authentification in cupsd.conf so we could at least add the printer to the client. In a second step, go to Control Panel -> Printers, right click on the printer -> Printer Properties -> Ports -> choose appropriate port and click configure to enter the credentials in the upcoming window.HTH.