2

I need to send a request to CUPS server with the specific request-user parameter - remote_user instead of local_user. How should I set the local CUPS server?

Maciej Piechotka
  • 667
  • 1
  • 6
  • 14

2 Answers2

2

According to the CUPS release notes, support for specifying a different username was added in CUPS 1.6b1:

  • CUPS now supports a User directive in client.conf and the CUPS_USER environment variable for overriding the default username (STR #3114)

The Ubuntu bug report below (I can't make it a link due to ServerFault limits) is another place to look for information and workarounds for pre-CUPS 1.6b1, although the workarounds are not very practical.

bugs.launchpad.net/common-print-dialog-gtk/+bug/856776

Animism
  • 181
  • 5
1

If you print using this command:

lp -d yourprintername -U yourusername /path/to/file

you'll find requesting-user-name="yourusername" in CUPS' error_log file (but your cupsd.conf needs to be edited to use LogLevel debug for that message to show up).

If you want to force a default option for all users, run this command as root:

lpoptions -d yourprintername -o requesting-user-name=someusername

[Note: some versions of CUPS seem to mix up 'job-originating-user-name' and 'requesting-user-name'. So you know if my suggestion doesn't work for you...]

Kurt Pfeifle
  • 1,746
  • 2
  • 12
  • 19