[Samba] Windows 2000/2003 shares -> danish character problem.

Martin Moeller martin at liga.dk
Thu Jul 22 13:46:49 GMT 2004


I bit more information:

If I use smbclient in stead of smbfs, all letters are displayed
correctly and navigation to all folders becomes possible. No setting I
have tried have allowed this for filenames or directories containing 'ø'
(o-slash)

Mandrake kernel: 2.6.3-7mdk
Mandrake samba version: samba-client-3.0.2a-3mdk

Debug output from smbclient:
-------------------------------
[cecilie at localhost cecilie]$ smbclient -d 5 //ss-pdc/Data 
INFO: Current debug levels: 
all: True/5 
tdb: False/0 
printdrivers: False/0 
lanman: False/0 
smb: False/0 
rpc_parse: False/0 
rpc_srv: False/0 
rpc_cli: False/0 
passdb: False/0 
sam: False/0 
auth: False/0 
winbind: False/0 
vfs: False/0 
idmap: False/0 
quota: False/0 
lp_load: refreshing parameters 
Initialising global parameters 
params.c:pm_process() - Processing configuration file
"/etc/samba/smb.conf" 
Processing section "[global]" 
doing parameter workgroup = MDKGROUP 
doing parameter server string = Samba Server %v 
doing parameter printcap name = cups 
doing parameter load printers = yes 
doing parameter printing = cups 
doing parameter printer admin = @adm 
doing parameter log file = /var/log/samba/log.%m 
doing parameter max log size = 50 
doing parameter map to guest = bad user 
doing parameter security = user 
doing parameter encrypt passwords = yes 
doing parameter smb passwd file = /etc/samba/smbpasswd 
doing parameter socket options = TCP_NODELAY SO_RCVBUF=8192
SO_SNDBUF=8192 
doing parameter dns proxy = no 
pm_process() returned Yes 
Attempting to register new charset UCS-2LE 
Registered charset UCS-2LE 
Attempting to register new charset UTF8 
Registered charset UTF8 
Attempting to register new charset ASCII 
Registered charset ASCII 
Attempting to register new charset 646 
Registered charset 646 
Attempting to register new charset ISO-8859-1 
Registered charset ISO-8859-1 
Attempting to register new charset UCS2-HEX 
Registered charset UCS2-HEX 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
Substituting charset 'ISO-8859-15' for LOCALE 
added interface ip=10.20.1.75 bcast=10.20.1.255 nmask=255.255.255.0 
Netbios name list:- 
my_netbios_names[0]="LOCALHOST" 
Client started (version 3.0.2a). 
Opening cache file at /var/cache/samba/gencache.tdb 
tdb(unnamed): tdb_open_ex: could not open file
/var/cache/samba/gencache.tdb: Permission denied 
Attempt to open gencache.tdb has failed. 
resolve_lmhosts: Attempting lmhosts lookup for name ss-pdc<0x20> 
getlmhostsent: lmhost entry: 127.0.0.1 localhost 
resolve_wins: Attempting wins lookup for name ss-pdc<0x20> 
resolve_wins: WINS server resolution selected and no WINS servers
listed. 
resolve_hosts: Attempting host lookup for name ss-pdc<0x20> 
Opening cache file at /var/cache/samba/gencache.tdb 
tdb(unnamed): tdb_open_ex: could not open file
/var/cache/samba/gencache.tdb: Permission denied 
Attempt to open gencache.tdb has failed. 
Connecting to 10.20.1.5 at port 445 
socket option SO_KEEPALIVE = 0 
socket option SO_REUSEADDR = 0 
socket option SO_BROADCAST = 0 
socket option TCP_NODELAY = 1 
socket option IPTOS_LOWDELAY = 0 
socket option IPTOS_THROUGHPUT = 0 
socket option SO_SNDBUF = 16384 
socket option SO_RCVBUF = 16384 
socket option SO_SNDLOWAT = 1 
socket option SO_RCVLOWAT = 1 
socket option SO_SNDTIMEO = 0 
socket option SO_RCVTIMEO = 0 
session request ok 
size=180 
smb_com=0x72 
smb_rcls=0 
smb_reh=0 
smb_err=0 
smb_flg=136 
smb_flg2=51201 
smb_tid=0 
smb_pid=17514 
smb_uid=0 
smb_mid=1 
smt_wct=17 
smb_vwv[ 0]= 8 (0x8) 
smb_vwv[ 1]=12807 (0x3207) 
smb_vwv[ 2]= 256 (0x100) 
smb_vwv[ 3]= 1024 (0x400) 
smb_vwv[ 4]= 65 (0x41) 
smb_vwv[ 5]= 0 (0x0) 
smb_vwv[ 6]= 256 (0x100) 
smb_vwv[ 7]= 0 (0x0) 
smb_vwv[ 8]= 0 (0x0) 
smb_vwv[ 9]=64768 (0xFD00) 
smb_vwv[10]= 243 (0xF3) 
smb_vwv[11]=65152 (0xFE80) 
smb_vwv[12]=28381 (0x6EDD) 
smb_vwv[13]=53307 (0xD03B) 
smb_vwv[14]=50287 (0xC46F) 
smb_vwv[15]=34817 (0x8801) 
smb_vwv[16]= 255 (0xFF) 
smb_bcc=111 
size=180 
smb_com=0x72 
smb_rcls=0 
smb_reh=0 
smb_err=0 
smb_flg=136 
smb_flg2=51201 
smb_tid=0 
smb_pid=17514 
smb_uid=0 
smb_mid=1 
smt_wct=17 
smb_vwv[ 0]= 8 (0x8) 
smb_vwv[ 1]=12807 (0x3207) 
smb_vwv[ 2]= 256 (0x100) 
smb_vwv[ 3]= 1024 (0x400) 
smb_vwv[ 4]= 65 (0x41) 
smb_vwv[ 5]= 0 (0x0) 
smb_vwv[ 6]= 256 (0x100) 
smb_vwv[ 7]= 0 (0x0) 
smb_vwv[ 8]= 0 (0x0) 
smb_vwv[ 9]=64768 (0xFD00) 
smb_vwv[10]= 243 (0xF3) 
smb_vwv[11]=65152 (0xFE80) 
smb_vwv[12]=28381 (0x6EDD) 
smb_vwv[13]=53307 (0xD03B) 
smb_vwv[14]=50287 (0xC46F) 
smb_vwv[15]=34817 (0x8801) 
smb_vwv[16]= 255 (0xFF) 
smb_bcc=111 
Serverzone is -7200 
Password: 
Doing spnego session setup (blob length=111) 
got OID=1 2 840 48018 1 2 2 
got OID=1 2 840 113554 1 2 2 
got OID=1 2 840 113554 1 2 2 3 
got OID=1 3 6 1 4 1 311 2 2 10 
got principal=ss-pdc$@SEXOGSAMFUND.DK 
size=560 
smb_com=0x73 
smb_rcls=22 
smb_reh=0 
smb_err=49152 
smb_flg=136 
smb_flg2=51201 
smb_tid=0 
smb_pid=17514 
smb_uid=4096 
smb_mid=2 
smt_wct=4 
smb_vwv[ 0]= 255 (0xFF) 
smb_vwv[ 1]= 560 (0x230) 
smb_vwv[ 2]= 0 (0x0) 
smb_vwv[ 3]= 443 (0x1BB) 
smb_bcc=517 
size=560 
smb_com=0x73 
smb_rcls=22 
smb_reh=0 
smb_err=49152 
smb_flg=136 
smb_flg2=51201 
smb_tid=0 
smb_pid=17514 
smb_uid=4096 
smb_mid=2 
smt_wct=4 
smb_vwv[ 0]= 255 (0xFF) 
smb_vwv[ 1]= 560 (0x230) 
smb_vwv[ 2]= 0 (0x0) 
smb_vwv[ 3]= 443 (0x1BB) 
smb_bcc=517 
Got challenge flags: 
Got NTLMSSP neg_flags=0x60890215 
NTLMSSP_NEGOTIATE_UNICODE 
NTLMSSP_REQUEST_TARGET 
NTLMSSP_NEGOTIATE_SIGN 
NTLMSSP_NEGOTIATE_NTLM 
NTLMSSP_NEGOTIATE_NTLM2 
NTLMSSP_CHAL_TARGET_INFO 
NTLMSSP_NEGOTIATE_128 
NTLMSSP_NEGOTIATE_KEY_EXCH 
NTLMSSP: Set final flags: 
Got NTLMSSP neg_flags=0x60080215 
NTLMSSP_NEGOTIATE_UNICODE 
NTLMSSP_REQUEST_TARGET 
NTLMSSP_NEGOTIATE_SIGN 
NTLMSSP_NEGOTIATE_NTLM 
NTLMSSP_NEGOTIATE_NTLM2 
NTLMSSP_NEGOTIATE_128 
NTLMSSP_NEGOTIATE_KEY_EXCH 
NTLMSSP challenge set by NTLM2 
challenge is: 
[000] C0 C3 0F 24 AA 01 24 8E ÀÃ.$ª.$. 
NTLMSSP Sign/Seal - Initialising with flags: 
Got NTLMSSP neg_flags=0x60080215 
NTLMSSP_NEGOTIATE_UNICODE 
NTLMSSP_REQUEST_TARGET 
NTLMSSP_NEGOTIATE_SIGN 
NTLMSSP_NEGOTIATE_NTLM 
NTLMSSP_NEGOTIATE_NTLM2 
NTLMSSP_NEGOTIATE_128 
NTLMSSP_NEGOTIATE_KEY_EXCH 
size=126 
smb_com=0x73 
smb_rcls=0 
smb_reh=0 
smb_err=0 
smb_flg=136 
smb_flg2=51201 
smb_tid=0 
smb_pid=17514 
smb_uid=4096 
smb_mid=3 
smt_wct=4 
smb_vwv[ 0]= 255 (0xFF) 
smb_vwv[ 1]= 126 (0x7E) 
smb_vwv[ 2]= 0 (0x0) 
smb_vwv[ 3]= 9 (0x9) 
smb_bcc=83 
size=126 
smb_com=0x73 
smb_rcls=0 
smb_reh=0 
smb_err=0 
smb_flg=136 
smb_flg2=51201 
smb_tid=0 
smb_pid=17514 
smb_uid=4096 
smb_mid=3 
smt_wct=4 
smb_vwv[ 0]= 255 (0xFF) 
smb_vwv[ 1]= 126 (0x7E) 
smb_vwv[ 2]= 0 (0x0) 
smb_vwv[ 3]= 9 (0x9) 
smb_bcc=83 
Domain=[SEXOGSAMFUND] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
session setup ok 
size=54 
smb_com=0x75 
smb_rcls=0 
smb_reh=0 
smb_err=0 
smb_flg=136 
smb_flg2=51201 
smb_tid=36869 
smb_pid=17514 
smb_uid=4096 
smb_mid=4 
smt_wct=3 
smb_vwv[ 0]= 255 (0xFF) 
smb_vwv[ 1]= 54 (0x36) 
smb_vwv[ 2]= 1 (0x1) 
smb_bcc=13 
tconx ok 
smb: \> size=35

For completenes sake, here is the debug output from mount:

[root at localhost cecilie]# mount -t smbfs //ss-pdc/Data Server/ -o
username=cecilie,codepage=cp850,iocharset=iso8859-15,debug=5
passthrough options 'codepage=cp850,iocharset=iso8859-15'
mount.smbfs started (version 3.0.2a)
added interface ip=10.20.1.75 bcast=10.20.1.255 nmask=255.255.255.0
Opening cache file at /var/cache/samba/gencache.tdb
name ss-pdc#20 found.
Connecting to 10.20.1.5 at port 445
socket option SO_KEEPALIVE = 0
socket option SO_REUSEADDR = 0
socket option SO_BROADCAST = 0
socket option TCP_NODELAY = 1
socket option IPTOS_LOWDELAY = 0
socket option IPTOS_THROUGHPUT = 0
socket option SO_SNDBUF = 16384
socket option SO_RCVBUF = 16384
socket option SO_SNDLOWAT = 1
socket option SO_RCVLOWAT = 1
socket option SO_SNDTIMEO = 0
socket option SO_RCVTIMEO = 0
17567: session request ok
size=117
smb_com=0x72
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=49153
smb_tid=0
smb_pid=17567
smb_uid=0
smb_mid=1
smt_wct=17
smb_vwv[ 0]=    8 (0x8)
smb_vwv[ 1]=12807 (0x3207)
smb_vwv[ 2]=  256 (0x100)
smb_vwv[ 3]= 1024 (0x400)
smb_vwv[ 4]=   65 (0x41)
smb_vwv[ 5]=    0 (0x0)
smb_vwv[ 6]=  256 (0x100)
smb_vwv[ 7]=    0 (0x0)
smb_vwv[ 8]=    0 (0x0)
smb_vwv[ 9]=64768 (0xFD00)
smb_vwv[10]=  243 (0xF3)
smb_vwv[11]= 7168 (0x1C00)
smb_vwv[12]=50630 (0xC5C6)
smb_vwv[13]=53859 (0xD263)
smb_vwv[14]=50287 (0xC46F)
smb_vwv[15]=34817 (0x8801)
smb_vwv[16]= 2303 (0x8FF)
smb_bcc=48
size=117
smb_com=0x72
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=49153
smb_tid=0
smb_pid=17567
smb_uid=0
smb_mid=1
smt_wct=17
smb_vwv[ 0]=    8 (0x8)
smb_vwv[ 1]=12807 (0x3207)
smb_vwv[ 2]=  256 (0x100)
smb_vwv[ 3]= 1024 (0x400)
smb_vwv[ 4]=   65 (0x41)
smb_vwv[ 5]=    0 (0x0)
smb_vwv[ 6]=  256 (0x100)
smb_vwv[ 7]=    0 (0x0)
smb_vwv[ 8]=    0 (0x0)
smb_vwv[ 9]=64768 (0xFD00)
smb_vwv[10]=  243 (0xF3)
smb_vwv[11]= 7168 (0x1C00)
smb_vwv[12]=50630 (0xC5C6)
smb_vwv[13]=53859 (0xD263)
smb_vwv[14]=50287 (0xC46F)
smb_vwv[15]=34817 (0x8801)
smb_vwv[16]= 2303 (0x8FF)
smb_bcc=48
Serverzone is -7200
Password:
size=91
smb_com=0x73
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=0
smb_pid=17567
smb_uid=2051
smb_mid=2
smt_wct=3
smb_vwv[ 0]=  255 (0xFF)
smb_vwv[ 1]=   91 (0x5B)
smb_vwv[ 2]=    0 (0x0)
smb_bcc=50
17567: session setup ok
size=49
smb_com=0x75
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=38912
smb_pid=17567
smb_uid=2051
smb_mid=3
smt_wct=3
smb_vwv[ 0]=  255 (0xFF)
smb_vwv[ 1]=   49 (0x31)
smb_vwv[ 2]=    1 (0x1)
smb_bcc=8
17567: tconx ok
[root at localhost cecilie]# ls -l Server/In
Info1           Internationalt
[root at localhost cecilie]# ls -l Server/Internationalt/
totalt 36
drwxr-xr-x  1 root root 4096 jul 17 09:55 1WHRAP_ansogning/
drwxr-xr-x  1 root root 4096 jul 17 09:55 2WHRAP_ansogning/
drwxr-xr-x  1 root root 4096 jul 17 09:56 Int1/
drwxr-xr-x  1 root root 4096 jul 17 09:56 Int2/
drwxr-xr-x  1 root root 4096 jul 20 09:19 Int_generelt/
drwxr-xr-x  1 root root 4096 jul 17 09:56 Intstud1/
drwxr-xr-x  1 root root 4096 jul 17 09:56 Intstud2/
drwxr-xr-x  1 root root 4096 jul 17 09:56 Intstud3/
drwxr-xr-x  1 root root 4096 jul 19 15:47 NGO Aids-Netværk/
[root at localhost cecilie]# ls -l Server/Internationalt/2WHRAP_ansogning/
totalt 0

ons, 2004-07-21 kl. 16:06 skrev Martin Moeller:
> Hello all.
> 
> I have been given an assignment to mount a share automatically for each
> user using a given Linux machine (Mandrake 10 in this case). This is
> working fine, thanks to pam_mount, BUT:
> 
> The mounted share contains national characters like this: æ ø å.
> 
> The problem I'm having is that when I mount these on Linux the 'ø' looks
> like 'o' but cannot be accessed like that. It says the file or directory
> doesn't exist (and it has a point). I have seen this on both Windows
> 2000 and Windows 2003 Server. Interestingly enough there are no problems
> with Windows XP, as long as I use codepage=cp850 to mount with.
> 
> I have tried these codepages: cp437, cp850, cp865, cp1250, cp1251, utf8
> I even tried 'latin1' just to see what would happen.
> 
> I guess there is something that should be changed on the Windows machine
> for this to work? If so does anyone know what that would be?
> 
> Part of the problem is that it is a literal 'o' that is shown in the
> Linux filesystem but when this filename is requested of the Windows
> server it of course denies any knowledge of such a thing.
> 
> When I write a file that has 'æøå' *inside* there are no problems
> displaying that. I have tried googling for clues for quite a while now
> and haven't found that much other than 'chcp 850' on the Windows
> machine. This doesn't seem to alleviate the problem when the Windows box
> is the server... Is it a matter of forcing cp850 at a much earlier state
> (running just chcp gives '437')?
> 
> Any takers? :)
-- 
###

Martin Moeller
Liga LinDist ApS.
Faelledvej 16D
DK-2200  Copenhagen N
Tel: +45 35 36 95 05
Fax: +45 35 36 92 05

http://www.liga.dk
mailto: martin at liga.dk




More information about the samba mailing list