Description of problem: On a LAN using CP850 for smb (dos charset in /etc/samba/smb.conf) and computers configured in UTF-8 (unix charset = UTF-8), smbmount ignores these default configuration parameters and performs no conversion. To make smbmount work, you have to specify -o codepage=cp850 Steps to Reproduce: 1.Configure machine1 as samba server with "dos charset = CP850" and "unix charset = UTF-8". Create a share. In this share, create a file with accentuated characters in its name (i.e.: "sträñgêfìlename"). 2. Configure machine2 as samba client with "dos charset = CP850" and "unix charset = UTF-8". 3. On machine2, "smbmount //machine1/share /mntdir" 4. On machine2, "ls /mntdir" Actual Results: list file as "str??g?f?lename". Expected Results: list file as "sträñgêfìlename". (Show accentuated characters). Additional info: As smbclient forks fine this way, smbmount should use the configuration character set conversion by default rather than performing no conversion at all. I cannot configure "dos charset = UTF-8" on this LAN because some other (old) machines do not support it... Note: this bug has already been reported to RH/Fedora at https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130980 I report here again since I suspect the info did not propagate...
Created attachment 684 [details] My patch for this bug Here is my proposed patch. It supports upper/lowercase charset names recognized by the Linux kernel, plus upper/lower "UTF-8". Since charset names are interpreted in the kernel, no iconv alias names may be used
hm, what is wrong with mount -t smbfs -o codepage=cp850,iocharset=utf8 ? Doesn't that work for you?
Of course it works, but: 1) Many GUI softwares (such as LinNeighborhood) use smbmount and do not have charset options, 2) Storing mount info for smbfs in fstab is not easy due to the dynamic aspect of smb network and I cannot ask "normal" users to type commands like the one y ou mention, 3) The new behaviour is more coherent with the other samba programs, 4) This avoids configuration information redundancy (smb.conf + fstab + interactive typing + maybe some other configuration entity). 5) AFAIK, there is no drawback to this change !
sorry, no - iocharset option is coherrent with most other linux filesystems and smbfs is just another linux filesystem, it's not Samba. If other software does not correctly handle the needed options, that software should be fixed. Settings mount options in fstab is also not a big deal.
This is not an smbfs issue, but an smbmount issue. smbclient //machine1/share ls does the job properly (i.e.: using the defaults from smb.conf) without having to specify the charsets; but smbmount doesnt. Since both programs are user interfaces to some smb filesystems and members of the same package (samba!), I think they should use the same common default options.
there are kernel configuration parameters, which specify the default for smbfs. Please use that. It does make no sense to override defaults by defaults, especially if smbfs is not related to samba. Unfortunately smbmount is part of the samba suite yes.