[cups] Changing CUPS print request-user on MacOs Mojave

Helge Blischke helgeblischke at web.de
Wed Oct 2 12:44:46 PDT 2019



> Am 01.10.2019 um 16:46 schrieb Max <decimomaximus at gmail.com>:
> 
> Hi all,
> Since I have to configure a "follow-me" Kyocera printer in an enterprise environment on a winspooler with AD user, I need to specify a different CUPS request-user to print.
> By default CUPS sends a print request with the macos session login username, so for example if I'm logged in macos with "joe" username, the winspooler will receive a print-request with "joe" username, but I won't allowed to print because "joe" does not match my AD (Active Directory) user. Hence I need to change the CUPS user-request.
> On Linux I achieved this by setting the variable CUPS_USER to my AD user in /etc/environment file, so CUPS will send the print-request with my AD user specified in CUPS_USER.
> On MacOS I don't know how to get to solve the problem. I tried to use the client.conf with the "User" directive in my $HOME/.cups/ directory, but client.conf is deprecated and CUPS hangs.
> Is there another way to set the CUPS print request-user in Mojave?
> 
> Thanks in advance

I’m not aware of any such trick on MacOS. But, as you are printing to a Windows based system, I think you use a unique backend for all those printers.
If so, I’d suppose to write a wrapper script for your backend which in turn calls the original backend but exchanges the username 
(the second command line option, I think).

Helge



More information about the cups mailing list