# PAM config with CUPS

## Atomic Fusion

I know nothing about PAM, and the only thing I know about CUPS is that it really pisses me off.

Can someone walk me through setting PAM and CUPS up for authentication?

Thanks.

----------

## Veldrin

Could you first explain what exactly to try to achieve?

I my experience, cups and pam work flawlessly together - no config needed.

----------

## Atomic Fusion

I have a server computer (no X), to which I attached an HP printer. I installed CUPS, and modified the config so that I could access / and /admin from a different computer (with X). When adding a printer, it prompts for a username and password, which I enter root and the root password. Then the box pops up again, without complaining about an incorrect password. The authentication type was "Basic".

I did manage to get temporary access by setting authentication type to "BasicDigest", and using lppasswd, but lppasswd doesn't accept my password, and PAM seems, better, anyway.

----------

## Veldrin

I seems, that it has been a while, since i configured cups on my server....

Basically you need to 2 changes in /etc/cups/cupsd.conf

```
Listen 192.168.10.10:631
```

```
<location />

...

Allow From 192.168.10.0/24

...

</location>
```

The first tell cups, on which IP:Port it should listen - add this line somewhere around Listen localhost:631.

The second change depends on how fine grained access you want. In the example shows only the root (/) section; a similar line need to added to all location portions. It allows access from then entire local network to cups. 

(I assumed that your cups server runs in192.168.10.10, and your local network is 192.168.10.0/24)

I hope that helps

cheers

V.

----------

## Atomic Fusion

I did change the config so that it listened to my local network, and allows access for 192.168.100.* to / and /admin. I can print, its just I can't use the admin pages, or anything that requires authentication, without doing stuff that isn't very secure and I'd rather not do.

Thanks.

----------

## Veldrin

Can you post the relevant part of you config file?

(I can post mine, but not until tonight...)

----------

