[cups] CUPS & PAM
Dmitry Voronin
carriingfate92 at yandex.ru
Fri Oct 14 03:02:28 PDT 2016
Hello,
> The client connecting to the server did so twice. Without more information it is impossible to say why this is the case, but the error_log just reports what is happening - the server (cupsd) does not synthesize artificial client connections, it just creates them in response to a socket connection.
I make a test example to recreate situation.
So, I have local user in Debian 8 with name 'lpadm' (so, it's user, who send IPP request to CUPS, change this in pamtest.c). lpadm is in lpadmin group. I set password by 'passwd' command.
I create printer 'printer' with 'default' policy (I call CUPS to get all jobs from those printer).
I change 'default' policy in cupsd.conf by adding those lines:
<Limit CUPS-Get-Jobs>
AuthType Default
Require valid-user
Order deny,allow
</Limit>
(before <Limit All> row of default's <Policy> tag)
Next, I set settings of cups server:
# cupsctl --remote-user --share-printers --remote-any
# cupsctl ServerAlias=*
I add my hostname in /etc/cups/client.conf:
ServerName 192.168.32.227
And I restart CUPS server:
# service cups restart
Compile test program and run:
$ make
$ ./pamtest
/* CUPS asks me for password
* we enter incorrect password
* and get something in error_log like I sent early
*/
In attachement pamtest.c source code program and Makefile to building.
--
Best regards, Dmitry Voronin
More information about the cups
mailing list