strange problem with samba and Chinese letters

bartoszx

Registered
Here is my strange problem.
I have new imac with os 10.6.2 and I want to connect to company smba server.
I copied nsmb.conf from another mac to my /etc/
Here is content of above file
[default]
minauth=none
streams=yes
soft=yes

Finder->Go->Connect to server
smb://192.168.168.4
user bart
password xxxx

You entered an invalid username or password. Please try again.

Password and username are correct because I can connect from my laptop.
Here is most interesting part. Samba log from ubuntu server:

[2010/08/06 17:30:03, 3] smbd/sesssetup.c:reply_sesssetup_and_X(1608)
Domain=[慍⁣协堠ㄠ⸰6䵓䙂⁓⸱⸶0] NativeOS=[] NativeLanMan=[] PrimaryDomain=[null]
[2010/08/06 17:30:03, 3] smbd/sesssetup.c:reply_sesssetup_and_X(1624)
sesssetupX:name=[慍⁣协堠ㄠ⸰6䵓䙂⁓⸱⸶0]\[慫業歬牵浩捡]@[192.168.168.121]
[2010/08/06 17:30:03, 3] auth/auth.c:check_ntlm_password(220)
check_ntlm_password: Checking password for unmapped user [慍⁣协堠ㄠ⸰6䵓䙂⁓⸱⸶0]\[慫業歬牵浩捡]@[192.168.168.121] with the new password interfac


smb_pam_auth: PAM: Authentication Error for user 慫業歬牵浩捡
[2010/08/06 17:30:05, 2] auth/pampass.c:smb_pam_error_handler(76)
smb_pam_error_handler: PAM: Authentication Failure : Authentication failure
[2010/08/06 17:30:05, 0] auth/pampass.c:smb_pam_passcheck(820)
smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User 慫業歬牵浩捡 !
[2010/08/06 17:30:05, 3] smbd/sec_ctx.c:pop_sec_ctx(432)
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/08/06 17:30:05, 2] auth/auth.c:check_ntlm_password(318)
check_ntlm_password: Authentication for user [慫業歬牵浩捡] -> [慫業歬牵浩捡] FAILED with error NT_STATUS_WRONG_PASSWORD


Any idea what does it mean?
 
As a first guess, it could be the special characters.

Can you connect as a user which is latin characters only, and in usergroup, domain and password and computer and sharename that are all latin characters only?

Second, can you connect from Terminal or do you get the same error?

Code:
smbclient //dns-name-or-ip/sharename -W workgroup -U username

There are a ton of different reasons why smb or afp between an OS X and a Windows box might not work.
Someone (in that link) had reported an umlauted character returning 'wrong password' error until the special characters were removed. So the same could be valid for your case.

(And that's none of just Mac OS X side errors... I've seen all sorts of weird errors in Windows server applications, connection brokers, servers and client applications due to unexpected, that is non-English characters in one of the computers in the whole server environment. No matter whether the username was German or system in Finnish or computer name in Chinese or Korean, or the date set to Danish standard or just anything else except English/US. Plenty of cases because of that at work with non-US cases)

The link I posted above is huge - there are tons of variables and what fixed. As always, systematic approach is best so I'd recommend first trying the two options above, and if Terminal fails you should be able to get a bit more verbose reasons why it failed in Terminal itself or in Console. (and you can copy the error/result here)
 
Hi Giaguara
Thanks for reply

I connect as user which is latin characters only. We dont use polish characters in server names, groups, password etc. We use only polish characters in files names.

Yes I can connect from shell using following command
smbclient //192.168.168.4/workspace.local.my -W lan -U bart

We do not use any Chinese characters at all. I've checked your link but found no any hints.

However I've noticed something interesting. We have two samba servers. Both on ubuntu - one with encrypted password and one with plain text password.

I CAN connect to samba server with encrypted password.

p.s I also can connect to both servers from my macosx laptop.
 
Hm - for some reason the characters from your Linux paste showed in Chinese (hence the guess for Chinese).

Your nsmb.conf looks fine - what's the permissions on it?
(after creating it sudo chmod a+r /etc/nsmb.conf should do it)

any difference if nsmb.conf contains only
[default]
minauth=none

?
 
No difference. I created new file /etc/nsmb.conf. I have not copied the content, but I entered manually
[default]
minauth=none

Problem still exists.
 
Can you get the logs from the Mac (/Applications/Utilities/Console > all logs) when 1) it connects to the smb server successfully and 2) unsuccessfully?
Post them here. There should be more detail than on the gui.
 
Hi Giaguara

I gave up. Two days looking for the problem and finally decided to change the configuration of samba servers. Now both servers use encrypted password.
 
If there is no difference for other machines there in whether the server uses encrypted or clear then I'd agree. Time is money and encrypted is better (IMHO).
 
Back
Top