Youlin Feng
2007-Jun-09 07:09 UTC
[Samba] smbclient error: NT_STATUS_BAD_NETWORK_NAME, on shared foler with a Chinese name
Hi folks, I am trying to access the shared folders on a Windows XP PC from a Linux (FC5) PC using smbclient. Linux config info: $ locale LANG=en_US.UTF-8 $ rpm -q samba samba-3.0.24-6.fc5 smb.conf: [global] dos charset = CP936 <--- Simplified Chinese unix charset = UTF-8 display charset = LOCALE Now, here is the problem: smbclient can list the shared folders, including one with a Chinese name; but smbclient can't access the Chinese folder itself. The Chinese folder name could be messed up on your display due to either the encoding or the fonts issue. This isn't the issue here. $ smbclient -L kings-win -U user%passwd Domain=[KINGS-WIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Sharename Type Comment --------- ---- ------- IPC$ IPC ?? IPC SharedDocs Disk D_Drive Disk C_Drive Disk ???? Disk <---- shared folder in Chinese Domain=[KINGS-WIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] Server Comment --------- ------- Workgroup Master --------- ------- $ smbclient \\\\kings-win\\SharedDocs -U user passwd Domain=[KINGS-WIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] smb: \> So far, so good. Now, try to access the Chinese folder: $ smbclient \\\\kings-win\\???? -U user passwd Domain=[KINGS-WIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] tree connect failed: NT_STATUS_BAD_NETWORK_NAME What could be the problem? I should point out that this Chinese shared folder is located in the D partition, i.e. the D_Drive shared folder contains the Chinese-named folder. Obviously this is no problem at all, since SharedDocs is inside C_Drive. Does anybody do similar thing, but with any other non-European shared folder name? Thank you very much! _________________________________________________________________ Make every IM count. Download Windows Live Messenger and join the i?m Initiative now. It?s free.?? http://im.live.com/messenger/im/home/?source=TAGWL_June07
Youlin Feng
2007-Jun-10 12:29 UTC
[Samba] smbclient error: NT_STATUS_BAD_NETWORK_NAME, on shared foler with a Chinese name
Well, the problem is the samba-client package I think. I tried the same test on a FC6 machine and it works ok. My FC5 has samba-client-3.0.24-6.fc5 The default FC6 has samba-client-3.0.23c-2 and I am even using the default smb.conf setting of "dos charset = CP850", instead of the Chinese charset of CP936, which is a bit odd. So something is broken in samba-client-3.0.24-6.fc5. ----------------------------------------> From: youlinfeng@hotmail.com > To: samba@lists.samba.org > Date: Sat, 9 Jun 2007 07:09:15 +0000 > Subject: [Samba] smbclient error: NT_STATUS_BAD_NETWORK_NAME, on shared foler with a Chinese name > > > Hi folks, > > I am trying to access the shared folders on a Windows XP PC from a Linux (FC5) PC using smbclient. > > Linux config info: > > $ locale > LANG=en_US.UTF-8 > > $ rpm -q samba > samba-3.0.24-6.fc5 > > smb.conf: > [global] > dos charset = CP936 <--- Simplified Chinese > unix charset = UTF-8 > display charset = LOCALE > > Now, here is the problem: smbclient can list the shared folders, including one with a Chinese name; but smbclient can't access the Chinese folder itself. > > The Chinese folder name could be messed up on your display due to either the encoding or the fonts issue. This isn't the issue here. > > $ smbclient -L kings-win -U user%passwd > Domain=[KINGS-WIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] > > Sharename Type Comment > --------- ---- ------- > IPC$ IPC ?? IPC > SharedDocs Disk > D_Drive Disk > C_Drive Disk > ???? Disk <---- shared folder in Chinese > > Domain=[KINGS-WIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] > > Server Comment > --------- ------- > > Workgroup Master > --------- ------- > $ smbclient \\\\kings-win\\SharedDocs -U user passwd > Domain=[KINGS-WIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] > smb: \> > > So far, so good. Now, try to access the Chinese folder: > > $ smbclient \\\\kings-win\\???? -U user passwd > Domain=[KINGS-WIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] > tree connect failed: NT_STATUS_BAD_NETWORK_NAME > > What could be the problem? > > I should point out that this Chinese shared folder is located in the D partition, i.e. the D_Drive shared folder contains the Chinese-named folder. Obviously this is no problem at all, since SharedDocs is inside C_Drive. > > Does anybody do similar thing, but with any other non-European shared folder name? > > Thank you very much! > > > > > > > > > > _________________________________________________________________ > Make every IM count. Download Windows Live Messenger and join the i?m Initiative now. It?s free. > http://im.live.com/messenger/im/home/?source=TAGWL_June07_________________________________________________________________ Play free games, earn tickets, get cool prizes! Join Live Search Club.? http://club.live.com/home.aspx?icid=CLUB_wlmailtextlink