# Disabling cups authentication for printing? [SOLVED]

## tld

Wow...I've tried everything here.  I have an HP printer working from my Gentoo machine.  I'm trying to set it up on a Windows machine using the url syntax: http://my_server_name:631/printers/my_printername and no matter what I do to the AuthType in cupsd.conf I get this in the cupsd log:

```
D [20/Aug/2010:20:54:14 -0400] cupsdAcceptClient: 10 from 192.168.1.100:631 (IPv4)

D [20/Aug/2010:20:54:14 -0400] cupsdReadClient: 10 POST /printers/HP-B209A HTTP/1.1

D [20/Aug/2010:20:54:14 -0400] cupsdAuthorize: No authentication data provided.

D [20/Aug/2010:20:54:14 -0400] cupsdSendError: 10 code=403 (Forbidden)

D [20/Aug/2010:20:54:14 -0400] cupsdCloseClient: 10

```

...When I click the next button in the windows printer dialog.  Actually I get that repeated three times.  I even get this if I set the DefaultAuthType to None.

What am I missing?

TomLast edited by tld on Sat Aug 21, 2010 2:34 pm; edited 1 time in total

----------

## Jimini

Please post your /etc/cups/cupsd.conf. 

This is my config - I have set up the printer the way you want to have it:

```
ServerName SOMENAME

ServerAdmin ADMIN@SOMENAME

AccessLog /var/log/cups/access_log

ErrorLog /var/log/cups/error_log

LogLevel notice

SystemGroup lpadmin

# Allow remote access

Port 631

Listen /var/run/cups/cups.sock

# Enable printer sharing and shared printers.

Browsing On

BrowseOrder allow,deny

BrowseAllow all

BrowseAddress @LOCAL 

DefaultAuthType Basic

HostNameLookups On

<Location />

  # Allow shared printing and remote administration...

  Order deny,allow

  Deny From All

  Allow From 10.0.0.*

  Allow From @LOCAL

</Location>

<Location /admin>

  # Allow remote administration...

  Encryption Required

  Order deny,allow

  Deny From All

  Allow From 10.0.0.*

  Allow From @LOCAL

</Location>

<Location /admin/conf>

  # Allow remote access to configuration files...

  Order deny,allow

  AuthType Default

  Require user @SYSTEM

  Deny From All

  Allow from 10.0.0.*

  Allow From @LOCAL

</Location>

<Policy default>

  <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 CUPS-Move-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>

    AuthType Default

    Require user @SYSTEM

    Order deny,allow

  </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 CUPS-Accept-Jobs CUPS-Reject-Jobs>

    AuthType Default

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  <Limit CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>
```

Best regards,

Jimini

----------

## tld

Your's has essentially the same thing mine has for authentication.  I don't think there's an issue with and of the allow/deny stuff:

```
#LogLevel info

LogLevel debug

# Administrator user group...

SystemGroup lpadmin

# Only listen for connections from the local machine.

Listen *:631

Listen /var/run/cups/cups.sock

# Show shared printers on the local network.

Browsing On

BrowseOrder allow,deny

BrowseAllow all

# Default authentication type, when authentication is required...

DefaultAuthType Basic

# Restrict access to the server...

<Location />

  Order allow,deny

</Location>

# Restrict access to the admin pages...

<Location /admin>

  Encryption Required

  Order allow,deny

</Location>

# Restrict access to configuration files...

<Location /admin/conf>

  AuthType Default

  Require user @SYSTEM

  Order allow,deny

</Location>

# Set the default printer/job policies...

<Policy default>

  # Job-related operations must be done by the owner or an administrator...

  <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 CUPS-Move-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  # All administration operations require an administrator to authenticate...

  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>

    AuthType Default

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  # All printer operations require a printer operator to authenticate...

  <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 CUPS-Accept-Jobs CUPS-Reject-Jobs>

    AuthType Default

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...

  <Limit Cancel-Job CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>

```

Also, am I correct that adding a printer using that url syntax is a raw printer that doesn't involve cups at all?

As far as the authentication, nothing I change seems to affect anything.  I would think AuthType None would disable it, but it seems to do nothing at all.

Tom

----------

## tld

I just tried this:

```
<Location />

#  Order allow,deny

  Order deny,allow

  Deny All

  Allow 192.168.1.0/24

  AuthType None

</Location>

```

That makes no difference at all:

```
D [21/Aug/2010:09:45:50 -0400] cupsdAcceptClient: 10 from 192.168.1.100:631 (IPv4)

D [21/Aug/2010:09:45:50 -0400] cupsdReadClient: 10 POST /printers/HP-B209A HTTP/1.1

D [21/Aug/2010:09:45:50 -0400] cupsdAuthorize: No authentication data provided.

D [21/Aug/2010:09:45:50 -0400] Get-Printer-Attributes http://dell2:631/printers/HP-B209A

D [21/Aug/2010:09:45:50 -0400] cupsdProcessIPPRequest: 10 status_code=0 (successful-ok)

```

I don't get it.

Tom

----------

## tld

Ah...I've made some progress.  I'm actually trying to share with an old Win2k machine that I'll be getting rid of in the near future.

I read that for some reason Win2k has trouble communicating directly with the printer name, but works with a cups class.  That got me past the authentication.

However Win2k tells me that the server "does not have the correct drivers".  How do I tell it that this is a raw printer?

Tom

----------

## tld

I was finally able to get it working.  In addition to using the class name rather than the printer name, on the Win2k side I selected a manufacturer of Generic and used the "MS Publisher Imagesetter" driver...seems to work just fine.

Tom

----------

