[cups] CUPS not sending correct user name
Florian Lindner
mailinglists at xgm.de
Thu Jun 5 00:58:34 PDT 2014
Am 04.06.2014 13:28, schrieb Helge Blischke:
> Looking into the sources (cups/usersys.c) reveals that to evaluate the
> user name
> to use the USER environment variable is checked first. The "User foo"
> directive
> in client.conf is only taken into account if the USER environment
> variable
> is not set or does not match the current UID. So you need, I think, to
> undefine (or set to empty) the USER environment variable prior to
> executing
> a print command.
Thanks for your reply!
That is real weird to my understanding. $USER is almost universally set
and unsetting it can be problematic. I took a look at the source file
you mentioned and noticed it checks the environment variable CUPS_USER
first, (line 855 of current 1.7 branch). Setting this variable does the
trick and printing works now!
So, thanks a lot!
Florian
>
> Helge
> Am 04.06.2014 um 12:32 schrieb Florian Lindner:
>
>> Hello,
>>
>> Dare to do a slightly updated repost.
>>
>> I use cups 1.7.3 on arch linux. My local username is florian and
>> printers are successfully discovered using cups-browsed and avahi. My
>> username that is permitted to print is lindnefn. User in client.conf
>> is set.
>>
>> florian at asaru ~ % cat /etc/cups/client.conf
>> # see 'man client.conf'
>> ServerName /var/run/cups/cups.sock # alternative: ServerName
>> hostname-or-ip-address[:port] of a remote server
>> User lindnefn
>>
>> florian at asaru ~ % cat ~/.cups/client.conf
>> User lindnefn
>>
>> If I go the cups webinterface on localhost it displays florian as
>> user name on the queue. My print jobs are permission denied from the
>> remote cups server. Printing on non restricted printers works.
>>
>> What could be wrong here?
>>
>> Thanks,
>> Florian
>> _______________________________________________
>> cups mailing list
>> cups at cups.org
>> https://www.cups.org/mailman/listinfo/cups
>
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups
More information about the cups
mailing list