Samba password login not working

Battling to load the password backend

Using opensuse 15.6 Leap
samba version
4.19.8+git.422.34307c5a3aa-150600.3.15.1

ls /usr/lib64/samba/pdb/ -lh
total 228K
-rwxr-xr-x 1 root root 142K May 5 08:09 ldapsam.so
-rwxr-xr-x 1 root root 42K May 5 08:09 smbpasswd.so
-rwxr-xr-x 1 root root 38K May 5 08:09 tdbsam.so

the smb.conf has the line
passdb backend = tdbsam

sudo pdbedit -L
[sudo] password for root:
added interface br0 ip=192.168.0.9 bcast=192.168.0.255 netmask=255.255.255.0
No builtin backend found, trying to load plugin

Does /var/lib/samba/private/passdb.tdb exist?

Can you read from the database ok by checking an existing samba user?
sudo pdbedit -v <username>
Or does that generate errors?

What happens if you try adding a samba user with
sudo smbpasswd -a <username>

sudo smbpasswd -a smart
No builtin backend found, trying to load plugin
New SMB password:
Retype new SMB password:
sudo pdbedit -v smart

added interface br0 ip=192.168.0.2 bcast=192.168.0.255 netmask=255.255.255.0
No builtin backend found, trying to load plugin
Unix username: smart
NT username:
Account Flags: [U ]
User SID: S-1-5-21-2514169082-2703920103-2495286368-1008
Primary Group SID: S-1-5-21-2514169082-2703920103-2495286368-513
Full Name: SMART
Home Directory: \SERVER\smart.9xprofile
HomeDir Drive: m:
Logon Script:
Profile Path: \SERVER\profiles.msprofile
Domain: SERVER
Account desc:
Workstations:
Munged dial:
Logon time: 0
Logoff time:
Kickoff time: Wed, 06 Feb 2036 17:06:39 SAST
Password last set: Mon, 23 Jun 2025 22:57:33 SAST
Password can change: Mon, 23 Jun 2025 22:57:33 SAST
Password must change: never
Last bad password : 0
Bad password count : 0
Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Please share the current working “[global]” section of smb.conf…
sed -n '/^\[global\]/,/^\[/{p}' /etc/samba/smb.conf
Note my use of formatted text. Please do the same when posting commands and output (refer to the </> button in the forum editor).

Also:

Run strace…
sudo strace -e openat pdbedit -v smart 2>&1 | grep tdbsam

[global]
workgroup = WORKGROUP
passdb backend = tdbsam
usershare allow guests = yes
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:
force user = smart
netbios name = SERVER
os level = 33
name resolve order = bcast host lmhosts wins
wins support = Yes
ntlm auth = yes
public = yes
unix password sync = Yes
server min protocol = SMB2_10
obey pam restrictions = yes
pam password change = yes
usershare owner only = false
usershare path = /var/lib/samba/usershares

If I use this below as a share folder, I cannot add filename and folder.
[tmp]
write list = smart,ashleigh
valid users = smart,ashleigh
path = /home/smart/tmp
inherit acls = Yes

With the share folder below I can add and delete / create file.
But when I open a document, it goes into read-only mode.
[Listings]
path = /home/smart/Windows/Listings
force create mode = 777
create mode = 777
force directory mode = 777
write list = smart,ashleigh
valid users = smart,ashleigh
directory mode = 777
inherit acls = Yes

…and the strace command?

openat(AT_FDCWD, “/usr/lib64/samba/pdb/tdbsam.so”, O_RDONLY|O_CLOEXEC) = 3

Ok, that checks out as expected. The installed samba packages are consistent?
zypper se -si samba

Please post the output as preformatted text as already requested. Go back and read my post about that.

 zypper se -si samba
Loading repository data...
Reading installed packages...

S  | Name                     | Type    | Version                                  | Arch   | Repository
---+--------------------------+---------+------------------------------------------+--------+-------------------------------------------------------------
i  | gvfs-backend-samba       | package | 1.52.2-150600.1.6                        | x86_64 | Main Repository
i  | libsamba-policy0-python3 | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba                    | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-client             | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-client-32bit       | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-client-libs        | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i+ | samba-client-libs-32bit  | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-dcerpc             | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-gpupdate           | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-ldb-ldap           | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-libs               | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-libs-python3       | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-python3            | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i+ | samba-test               | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i+ | samba-tool               | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-winbind            | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-winbind-libs       | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | samba-winbind-libs-32bit | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | yast2-samba-client       | package | 4.6.1-150600.1.2                         | noarch | Main Repository
i  | yast2-samba-server       | package | 4.6.0-150600.1.2                         | noarch | Main Repository

Ok so I decided to find a newer version of Samba. Now it looks like it’s working. Not giving me read-only in opening a document.

S  | Name                     | Type    | Version                                  | Arch   | Repository
---+--------------------------+---------+------------------------------------------+--------+-------------------------------------------------------------
i  | gvfs-backend-samba       | package | 1.52.2-150600.1.6                        | x86_64 | openSUSE:Leap:15.6
i  | gvfs-backend-samba       | package | 1.52.2-150600.1.6                        | x86_64 | SUSE:SLE-15:Update
i  | gvfs-backend-samba       | package | 1.52.2-150600.1.6                        | x86_64 | Main Repository
i+ | samba                    | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-client             | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i  | samba-client-32bit       | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i+ | samba-client-libs        | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-client-libs-32bit  | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i+ | samba-dcerpc             | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-gpupdate           | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-ldb-ldap           | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-libs               | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-libs-python3       | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-python3            | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-test               | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-tool               | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-winbind            | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i+ | samba-winbind-libs       | package | 4.22.2+git.396.c752843dcf4-lp156.1.1     | x86_64 | network:samba:STABLE
i  | samba-winbind-libs-32bit | package | 4.19.8+git.422.34307c5a3aa-150600.3.15.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
i  | yast2-samba-client       | package | 4.6.1-150600.1.2                         | noarch | openSUSE:Leap:15.6
i  | yast2-samba-client       | package | 4.6.1-150600.1.2                         | noarch | SUSE:SLE-15:Update
i  | yast2-samba-client       | package | 4.6.1-150600.1.2                         | noarch | Main Repository
i  | yast2-samba-server       | package | 4.6.0-150600.1.2                         | noarch | openSUSE:Leap:15.6
i  | yast2-samba-server       | package | 4.6.0-150600.1.2                         | noarch | SUSE:SLE-15:Update
i  | yast2-samba-server       | package | 4.6.0-150600.1.2                         | noarch | Main Repository