Steve Briggs
2008-Mar-31 14:55 UTC
[Samba] Username case mangling: Linux username is mixed-case, Samba returns lower-case
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 see I'm not the first to observe this change:
http://www.mail-archive.com/samba@lists.samba.org/msg85076.html
Linux prints fine to Cups-PDF, the username in the Cups logs
is shown as "Steve", and the older samba (3.0.24 on Fedora
Core 6) printed fine with username "Steve", it just seems
to be the newer Samba is lowercasing the username.
"%U" give "steve", "%u", "%$USER",
"%$(USER)" are all taken
literally (i.e. "%u" gives "%u"). Is there anyway to
get Samba to output the *real* Linux username?
As an aside.... while checking the samba documentation, I saw
references to how Linux usernames should "always" be all lower
case. Why? I've had mixed-case names for over 6 years and
am unaware of any problems until now. Certainly, standard
tools let you create mixed-case usernames without complaint.
TIA,
Steve
____________________________________________________________________________________
Special deal for Yahoo! users & friends - No Cost. Get a month of
Blockbuster Total Access now
http://tc.deals.yahoo.com/tc/blockbuster/text3.com
Chris Smith
2008-Mar-31 21:21 UTC
[Samba] Username case mangling: Linux username is mixed-case, Samba returns lower-case
On Monday 31 March 2008, Steve Briggs wrote:> I see I'm not the first to observe this change: > http://www.mail-archive.com/samba@lists.samba.org/msg85076.htmlThat's my post and was resolved as I stated - but that server uses winbind to authenticate to an NT PDC. And despite the initial problem it was probably for the best as with Windows not being case sensitive in regards to usernames the user may have logged on with different case models causing multiple directories to be made and not having access to the ones made under the other "spellings".> Certainly, standard > tools let you create mixed-case usernames without complaint.Not all standard tools will allow for mixed-case usernames. From Gentoo's "man useradd": =============================================CAVEATS <snip> Usernames must begin with a lower case letter or an underscore, and only lower case letters, underscores, dashes, and dollar signs may follow. In regular expression terms: [a-z_][a-z0-9_-]*[$] ============================================= Gentoo's useradd script will not allow the creation of a username beginning with an uppercase letter, although it can clearly be done the manual way by editing the proper files. Although Debian, and others do not adhere to this same strictness. And their same-named standard tools will allow for mixed-case usernames. It seems that with Windows usernames the conversion of %U to small case is quite helpful but with Linux usernames it can be a problem. It appears that possibly the "username level" parameter might help in your case. From smb.conf: "This parameter is needed only on UNIX systems that have case sensitive usernames", although it does seem badly worded (as UNIX systems, AFAIK, do have case sensitive usernames) and maybe should be written as "This parameter is needed only on UNIX systems that have mixed-case usernames". -- Chris
Seemingly Similar Threads
- Username case mangling -- Linux username is mixed-case, Samba returns lower-case
- Authentication with lower case username ONLY
- CUPS username case wrong from Windows 98 client
- Problem with mixed-case usernames and group mapping
- Username Case Sensitivity vs. Lower Casing