Should Samba pass "DOMAIN\username" or just "username" to CUPS?

Kurt Pfeifle kpfeifle at
Sun Dec 7 14:54:52 GMT 2003


I am asking Samba developers for opinions about a topic I've
discussed with Michael Sweet (CUPS developer).

The following problem occurred at a customer site:

   Windows users couldn't delete their own jobs.

This was on a CUPS/Samba print server being a member server to a
native ADS domain, with Samba-3.0.0 and CUPS 1.1.17.

When looking more closely, I discovered these lines in a CUPS
"LogLevel debug" error_log:

   D [01/Dec/2003:08:05:26 +0100] check_quotas: \
     requesting-user-name = 'MBTECH-GROUP.MILLENUX.COM_schmidt'
   D [01/Dec/2003:08:05:26 +0100] print_job: \
     requesting-user-name = 'MBTECH-GROUP.MILLENUX.COM_schmidt'
   I [01/Dec/2003:08:05:26 +0100] Job 1716 \
     queued on 'p5922265' by 'MBTECH-GROUP.MILLENUX.COM'.
   D [01/Dec/2003:08:05:26 +0100] Job 1716 hold_until = 0
   D [01/Dec/2003:08:05:26 +0100] StartJob(1716, 0x8164cb8)
   D [01/Dec/2003:08:05:26 +0100] StartJob() id = 1716, file = 0/1
   D [01/Dec/2003:08:05:26 +0100] job-sheets=none,none
   D [01/Dec/2003:08:05:26 +0100] banner_page = 0
   D [01/Dec/2003:08:05:26 +0100] StartJob: \
     argv = p5922265","1716","MBTECH-GROUP.MILLENUX.COM",\
   D [01/Dec/2003:08:05:26 +0100] StartJob: \
     envp = "PATH=/usr/lib/cups/filter:/bin:/usr/bin","SOFTWARE=CUPS/1.1",\

Note that...

  ... first "requesting-user-name" is logged by CUPS as

  ... while the 3rd argv  "$2" (which should also be the CUPS user,
      as seen by all CUPS filters and backends) is logged by CUPS as

In smb.conf the winbind separator is defined to be "\" (i.e.
  "windbind separator = \"). Authentication against the ADS domain
works for users as expected.

It is CUPS 1.1.17 (and maybe later versions also) which seems to do
some name mangling concerning the "\" character, resulting in one
case in conversion to an underscore, and in the other in a stripping
of the username part from the complete "DOMAIN\username" string.

Mike argues that Samba shouldn't be passing the DOMAIN part at all,
since "Windows IPP and LPD code sends the username without the domain"

As this is quite an urgent problem to be solved as soon as possible:
Please try to find a common (or Samba-only) fix for this (and let
me/the list know about it).

You can find our discussions on the "CUPS Software Trouble Report"


More information about the samba-technical mailing list