0

I have a problem with a samba service on my server. It's began since ubuntu have switched to samba 4.x in their distributions and continues til last one 15.04.

I have a user ag on my server and user AG on a Windows 7 box. In samba 3.x everything worked fine but in samba 4.x I've got some funny username mismatch issue.

I observe following behavior: When I login from Windows host I type a username ag (or AG it does not matter) and a password. Samba server rejects me for a first time but lets me in on second try. Actually, the same behavior show Linux and Mac OSX clients too, so it's not a Windows issue. I can simulate this from linux console following way:

nas@AGStorage:~$ smbclient -U AG //agvault/backup
Enter AG's password:
session setup failed: NT_STATUS_NO_MEMORY
nas@AGStorage:~$ smbclient -U AG //agvault/backup
Enter AG's password:
Domain=[HOME] OS=[Unix] Server=[Samba 4.1.13-Ubuntu]
smb: \> q

I tried to analyze the behavior with Wireshark and it shows clear that Windows tries first with AG (remember the user name in Windows is AG) and gets error, then comes with ag second time and gets Ok from samba server.

When I simulate the login with ag it lets in with a single try:

nas@AGStorage:~$ smbclient -U ag //agvault/backup
Enter ag's password:
Domain=[HOME] OS=[Unix] Server=[Samba 4.1.13-Ubuntu]
smb: \> q

I've tried suggested in internet solution: Adding a line username map = /etc/samba/usermap.txt to my smb.conf with ag = AG inside of mentioned usermap.txt but it does not work in my case.

How can I fix this inconsistent behavior of samba server? Any ideas?

Thanks in advance!

1
  • I've just noticed It might be not a user name case issue, but some different case, because it sometimes rejects me with ag (small) too. nas@AGStorage:~$ smbclient -U ag //agvault/backup Enter ag's password: session setup failed: NT_STATUS_NO_MEMORY nas@AGStorage:~$ smbclient -U ag //agvault/backup Enter ag's password: Domain=[HOME] OS=[Unix] Server=[Samba 4.1.13-Ubuntu] smb: \> q May 14, 2015 at 20:25

1 Answer 1

1

Following command helps a lot:

sudo service winbind stop

Somehow (I do not know exactly how) my samba server is missconfigured to talk to winbind even if it has a standalone server role. This seams to cause a misscommunication with winbind and NT_STATUS_NO_MEMORY failure on first login.

Have fun ppl!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .