smbclient gives NT_STATUS_NO_MEMORY

Hi,
I have an issue connecting to any samba server (Windows, FritzBox, …). It just doesn’t work anymore. Normally using dolphin for such things I tried smbclient to get more informations.
And this gives me:


~> smbclient -d 4 -L //fritz.box -U ftpuser
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
doing parameter workgroup =  
doing parameter passdb backend = tdbsam
doing parameter printing = cups
doing parameter printcap name = cups
doing parameter printcap cache time = 750
doing parameter cups options = raw
doing parameter map to guest = Bad User
doing parameter logon path = \\%L\profiles\.msprofile
doing parameter logon home = \\%L\%U\.9xprofile
doing parameter logon drive = P:
doing parameter usershare allow guests = No
doing parameter add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
doing parameter domain logons = No
doing parameter domain master = No
doing parameter security = domain
doing parameter wins support = Yes
doing parameter netbios name = lutzens
doing parameter usershare max shares = 100
doing parameter include = /etc/samba/dhcp.conf
Can't find include file /etc/samba/dhcp.conf
pm_process() returned Yes
added interface eth0 ip=2003:ca:53ee:c000:21e:4fff:feb4:17e7 bcast= netmask=ffff:ffff:ffff:ffff::
added interface eth0 ip=2003:ca:53ee:c000:c9bd:bcc7:6683:906a bcast= netmask=ffff:ffff:ffff:ffff::
added interface eth0 ip=192.168.178.34 bcast=192.168.178.255 netmask=255.255.255.0
Client started (version 4.6.7-git.38.90b2cdb4f223.1-SUSE-SLE_12-x86_64).
tdb(/var/lib/samba/gencache.tdb): tdb_open_ex: could not open file /var/lib/samba/gencache.tdb: Keine Bere
chtigung
resolve_hosts: Attempting host lookup for name fritz.box<0x20>
Connecting to 2003:ca:53ee:c000:e228:6dff:fe16:e4cd at port 445
 session request ok
Enter ftpuser's password:  
got OID=1.3.6.1.4.1.311.2.2.10
SPNEGO login failed: Memory allocation error
session setup failed: NT_STATUS_NO_MEMORY

Any ideas? Reinstalling all samba packages and a downgrade to 4.6.5 didn’t help.

You seem to have these unusual settings:

  • doing parameter security = domain
  • doing parameter wins support = Yes

That suggests to me that there has been a full re-installation of samba. But it doesn’t matter how this happened, it matters how to fix it.
Question 1: are you working with a WORKGROUP in a single Local Network or are you working with a DOMAIN in a Wide Network (a WAN is a series of small networks)?
Question 2: Can you please run this command and paste the outcome so we can see the setup:

cat /etc/samba/smb.conf

I’m in a singe Local Network with a WORKGROUP.
And the smb.conf is here:


[global]
    workgroup = 
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = No
    add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
    domain logons = No
    domain master = No
    security = domain
    wins support = Yes
    netbios name = lutzens
    usershare max shares = 100
    include = /etc/samba/dhcp.conf
[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes
[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700


[users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
    guest ok = No
[groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775


## Share disabled by YaST
# [netlogon]

I suggest you change the [global] stanza to this

[global]
    workgroup = WORKGROUP
    server string = ""
    name resolve order = bcast host lmhosts wins
    local master = yes
    os level = 65
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    usershare allow guests = No
    netbios name = lutzens
    usershare max shares = 100

You should check the WORKGROUP, check the other computers. It doesn’t matter what you choose, they must be all the same.

Afterthought: you should read this https://forums.opensuse.org/content.php/199-Configure-Samba-for-Local-Lan-Workgroup

In that have a look at the parts about

  1. How to blank out unwanted Shares
  2. How to set up a Roaming Share (to share your personal Linux home files)

Thank you, your recommended smb.conf works like a charm. Hopefully I will not destroy it in the future using Yast.
And many thanks for the tips regarding configuring samba for a workgroup.

Thanks again
Lutz