3

I am on Ubuntu Server 20.04, running Samba version 4.11.6-Ubuntu. I need to modify a Samba user account, but I am unable to open sam.ldb due to it apparently not being present. Here is the output:

$ samba-tool user edit username
ltdb: tdb(/var/lib/samba/private/sam.ldb): tdb_open_ex: could not open file /var/lib/samba/private/sam.ldb: No such file or directory

Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory Failed to connect to 'tdb:///var/lib/samba/private/sam.ldb' with backend 'tdb': Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory ERROR(ldb): uncaught exception - Unable to open tdb '/var/lib/samba/private/sam.ldb': No such file or directory File "/usr/lib/python3/dist-packages/samba/netcmd/init.py", line 186, in _run return self.run(args, *kwargs) File "/usr/lib/python3/dist-packages/samba/netcmd/user.py", line 2435, in run samdb = SamDB(url=H, session_info=system_session(), File "/usr/lib/python3/dist-packages/samba/samdb.py", line 65, in init super(SamDB, self).init(url=url, lp=lp, modules_dir=modules_dir, File "/usr/lib/python3/dist-packages/samba/init.py", line 115, in init self.connect(url, flags, options) File "/usr/lib/python3/dist-packages/samba/samdb.py", line 81, in connect super(SamDB, self).connect(url=url, flags=flags,

I cannot list users either. I haven't tried any other subcommands yet.

I checked the folder it's referring to. Here are the contents:

$ ls
msg.sock  netlogon_creds_cli.tdb  passdb.tdb  secrets.ldb  secrets.tdb

The Samba server is running only as a File Server. I'm not running an LDAP (as far as I know). I installed Samba originally under Ubuntu Server 18.04. Other than adding shares to the .conf file I've never made any modifications to the installation.

Kraus
  • 61

0 Answers0