Bug 14018 - samba-tool domain passwordsettings show crash
Summary: samba-tool domain passwordsettings show crash
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.10.4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-28 11:31 UTC by Amit Kumar
Modified: 2021-08-01 14:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Kumar 2019-06-28 11:31:12 UTC
# /usr/local/samba/bin/samba-tool domain passwordsettings show
ERROR(ldb): uncaught exception - ldb_search: invalid basedn '(null)'
  File "/usr/local/samba/lib64/python3.6/site-packages/samba/netcmd/__init__.py", line 185, in _run
    return self.run(*args, **kwargs)
  File "/usr/local/samba/lib64/python3.6/site-packages/samba/netcmd/domain.py", line 1310, in run
    "lockOutObservationWindow"])
Comment 1 Louis 2019-06-28 11:43:31 UTC
Hai Amit, 

Can you tell a bit  more of the running os and compile settings? 
Because my Debian Stretch build ( tested 4.10.5 ) did not show this problem.
Comment 2 Amit Kumar 2019-06-28 12:01:21 UTC
(In reply to Louis from comment #1)
Hey Louis,
Great Thanks for quick response. 

Fedora release 28 (Twenty Eight)
Compile settings(default):
# ./configure
# make;make install
Comment 3 Rowland Penny 2021-08-01 14:24:33 UTC
Closing this, misconfiguration of samba-tool command, no path to sam.ldb given. If I run the command on a Unix domain member I get exactly the same result as Amit:

sudo samba-tool domain passwordsettings show
ERROR(ldb): uncaught exception - ldb_search: invalid basedn '(null)'
  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/domain.py", line 1243, in run
    "lockOutObservationWindow"])

But if I add '-H ldap://rpidc1' to the command, it works:

sudo samba-tool domain passwordsettings show -H ldap://rpidc1
Password information for domain 'DC=samdom,DC=example,DC=com'

Password complexity: on
Store plaintext passwords: off
Password history length: 24
Minimum password length: 7
Minimum password age (days): 0
Maximum password age (days): 42
Account lockout duration (mins): 30
Account lockout threshold (attempts): 3
Reset account lockout after (mins): 30