[Samba] Re: Problems with Win-Username containing a "Umlaut"

Dragan Krnic dkrnic at lycos.com
Mon May 26 19:09:10 GMT 2003


>>> >> >I found out, that this is caused by the "ö" 
>>> >> >(german Umlaut). If the Username is "Marc 
>>> >> >Doerner" it'll work, but i'd like to keep it 
>>> >> >to "Marc Dörner". So: How can I set Umlaut-
>>> >> >letters in the username map?
>>> >
>>> >
>>> >> I've had that problem and simply have up. His 
>>> >> actual name is Doerner. But try poking the PC-
>>> >> ASCII code for "ö" in the username map. What 
>>> >> code does "ö" have now?
>>> >
>>> >
>>> >How can I set Ascii Codes in the username map? I 
>>> >know that the "ö" is Hex Code 0xF6 or Decimal 
>>> >246...
>>>
>>> That's octal 366. You can do something like:
>>>
>>>    echo -en "\0366"
>>>
>>> to produce the character and then poke it somehow 
>>> at the right place. dd can help.
>>>
>>> But what code is there now?
>>
>>Hi!
>>I typed in echo -en "\0366" and got a "6" back. So 
>>what to do with this "6"-Code?
>>How can I use it in the username.map?
>>Sorry, but i'm really a newbee to linux..
>
>That's OK Silvio. As I said I gave up in the previous
>try and convinced my user Jörg that his name is really
>Joerg. That was expedient. Now I'll take up the case
>again and shall let you know soon what I've found.

After some head-banging I can't say I understand why
small o-umlaut (0xf6) gets interpreted by samba in
6 different ways (as 0xf7, 0x94, 0x99, 0xcd, 0xd6, and
0xf6) but if you want an unlucky dörner to be able to 
use samba login and shares there is an ugly
work-around for that:

1. his home directory field in /etc/passwd should use 
0xf7 instead of 0xf6, like this:

   dörner:x:597:504::/home/d÷rner:/bin/bash

2. there has to be a duplicate of this /etc/passwd
line with a small difference - it should use 0x94
for o-umlaut like this:

   d~Trner:x:597:504::/home/d÷rner:/bin/bash

(it looks like a tilde-and-a-T on my screen)

3. do exactly the same for the respective entry in
samba/smbpasswd. i.e. duplicate the line for the user
with o-umlaut and replace the 0xf6 character with
0x94. The password fields MUST match.

4. make sure that his home and profile directories use
0xf7 instead of 0xf6 for the o-umlaut

With these changes, Mr. Doerner can login as dörner
if he's so keen about it.

Other than that, the relevant smb.conf entries are

[global]
........
   character set = ISO8859-1  
........
[profiles]
   path = /profiles/%U
........
[homes]
   path = /home/%U
........

There's a little problem when Mr. Doerner wants to
change his password. He can't. The only person that
can do it for him is the root.

I wish someone from Samba team would look into the
problem even though it only affects 92.5% of the world 
population in non-USASCII lands.

Cheers
Dragan

PS: You might wonder how you enter those characters.
The dörner with normal o-umlaut 0xf6 is what you
usually get when you press the o-umlaut on a German
keyboard. Lacking that you may try:

  echo -en "d\0366rner" > /tmp/some.file

Normally you should have the character 0xf6 as the
second character in the output file, but you may also 
check it by typing:

   dd conv=swab < /tmp/some.file | od -x

and if you get

   0000000 64f6 726e 6572

in response then it worked. Once you have it in a
file you can easily read it into a vi session with
the command ":r /tmp/some.file" and move it around
to where you need it. Perhaps there's even an easier
way with vi, but I don't know it.

For the other character 0xf7, which should be used
in the names of home and profiles directories use 
0367 instead of 0366.

For the third character 0x94, which is used for the
second passwd and smbpasswd entries, use 0224.

It's messy, I know, but this is the best I could
do. And don't even try "valid chars" option, it
makes no difference.


____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005



More information about the samba mailing list