[Samba] smbmount codepage/iocharset settings vs NT4

Leonard den Ottolander leonard-samba at ottolander.nl
Sun Oct 30 13:58:03 GMT 2005


Hi,

I'm in the process of setting up a backup server for a somewhat
antiquated NT4 server. Backup server is CentOS-4 (~ RHEL-4),
kernel-2.6.9-11.EL, samba-client-3.0.10-1.4E, rsync-2.6.3-1,
LANG=en_US.UTF-8. NT4 shares are mounted on the server and rsynced to
local disk.

This setup is working pretty well, however on the NT box there are some
files with names containing odd characters like accented characters and
ellipsis. I'm a bit at a loss as to the correct settings of the smbmount
iocharset and codepage parameters to use, and whether the display
charset and unix charset options in smb.conf are relevant to the mounts.

I've setup a test share. An ls in smbclient gives me the correct output
in a gnome-terminal and an mget gets me the files with their correctly
utf8itfied names (console seemed ok until after a toggle to X):

$ smbclient -U auser //david-bowie/Test
Password:
Domain=[EVERYTHING] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]
smb: \> ls
  .                                   D        0  Sat Oct 29 18:58:49
2005
  ..                                  D        0  Sat Oct 29 18:58:49
2005
  ellipsis zijn heel fijn (…).doc      A    24064  Sat Oct 29 18:57:14
2005
  Nogmaals ellipsis ….doc           A    24064  Sat Oct 29 18:58:31 2005
  één document á €50.doc         A    24064  Sat Oct 29 18:55:28 2005
  één document.doc                  A    24064  Sat Oct 29 18:54:20 2005
  ‘‰’.doc                       A    24064  Sat Oct 29 18:57:55 2005
  “quotes”.doc                    A    24064  Sat Oct 29 18:53:40 2005

                52004 blocks of size 262144. 2165 blocks available

However, an smbmount without any charset options gives me the following
result:

$ sudo mount -o username=auser //david-bowie/Test /mnt/tmp
Password:
$ ls /mnt/tmp
`%'.doc                          ??n document.doc
ellipsis zijn heel fijn (.).doc  Nogmaals ellipsis ..doc
??n document ? ?50.doc           "quotes".doc

Using cp850 improves the output somewhat:

$ sudo mount -o
username=auser,codepage=cp850 //david-bowie/Test /mnt/tmp
Password:
$ ls /mnt/tmp
`%'.doc                 ellipsis zijn heel fijn (.).doc
één document á ?50.doc  Nogmaals ellipsis ..doc
één document.doc        "quotes".doc

I assumed the code page used by NT4 was cp1252 ("MS-ANSI"), but using
cp1252 for the codepage gives me the same output for these files as the
mount with no codepage option set.

To make a long story short: What are the proper options to pass to
smbmount and/or set in /etc/samba/smb.conf?

Thanks,
Leonard.




More information about the samba mailing list