[Samba] Username case mangling -- Linux username is mixed-case, Samba returns lower-case

Jeremy Allison jra at samba.org
Tue Apr 8 20:20:36 GMT 2008

On Tue, Apr 08, 2008 at 09:56:45AM -0700, Steve Briggs wrote:
> I have a problem that I first observed when I upgraded from
> 3.0.24 to 3.0.28 and is, I believe, related to the introduction
> of the "printjob username" configuration parameter.
> I print via CUPS and the Cups-PDF driver wants to know the
> Linux username (so it can put the PDF in the proper location).
> The problem is that "printjob username = %U" results in
> a lowercase username ("steve"), even though the Linux account
> is "Steve".  The Samba logs clearly show me authenticating
> as "Steve" and the last message I see (with logging at 20)
> with an obvious user name shows me connecting to the
> Cups-PDF printer share with username "Steve".  But, the
> Cups logs show a username of "steve" -- which ends up mapped
> to anonymous.

I think you want to use '%u', not '%U'. From the man page :

          session username (the username that the client wanted, not necessarily the same  as  the  one
          they got).

this is the incoming Windows username. %u is :

          username of the current service, if any.

which is a UNIX username.


More information about the samba mailing list