[Samba] Failed to bind to uuid NT_STATUS_LOGON_FAILURE

Rowland Penny rpenny at samba.org
Thu Jun 6 08:23:16 UTC 2024


On Thu, 6 Jun 2024 10:49:23 +0300
Omnis ludis - games via samba <samba at lists.samba.org> wrote:

> I added a private directory, but this did not fix the problem, and
> for some reason the other path still appears
> testparm -v | grep private
> Load smb config files from /opt/samba/etc/smb.conf
> Loaded services file OK.
> Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility
> fallback)
> 
> Server role: ROLE_ACTIVE_DIRECTORY_DC
> 
> Press enter to see a dump of your service definitions
> 
>         private dir = /opt/samba/private
> 
> its code scripts again
> __docformat__ = "restructuredText"
> 
> 
> import optparse
> import sys
> # Allow to run from s4 source directory (without installing samba)
> sys.path.insert(0, "bin/python")
> 
> import samba.getopt as options
> from samba.credentials import DONT_USE_KERBEROS
> from samba.auth import system_session
> from samba import param
> from samba.provision import find_provision_key_parameters
> from samba.upgradehelpers import (get_paths,
>                                   get_ldbs,
>                                  update_machine_account_password)
> 
> parser = optparse.OptionParser("chgtdcpass [options]")
> sambaopts = options.SambaOptions(parser)
> parser.add_option_group(sambaopts)
> parser.add_option_group(options.VersionOptions(parser))
> credopts = options.CredentialsOptions(parser)
> parser.add_option_group(credopts)
> 
> opts = parser.parse_args()[0]
> 
> lp = sambaopts.get_loadparm()
> smbconf = lp.configfile
> creds = credopts.get_credentials(lp)
> creds.set_kerberos_state(DONT_USE_KERBEROS)
> 
> 
> if __name__ == '__main__':
>     paths = get_paths(param, smbconf=smbconf)
>     session = system_session()
> 
>     ldbs = get_ldbs(paths, creds, session, lp)
>     ldbs.startTransactions()
> 
>     names = find_provision_key_parameters(ldbs.sam, ldbs.secrets,
> ldbs.idmap,
>                                             paths, lp, smbconf)
> 
>     update_machine_account_password(ldbs.sam, ldbs.secrets, names)
>     ldbs.groupedCommit()
> 
> and error:
> ./chgtdcpass --configfile=/opt/samba/etc/smb.conf
> module samba_dsdb initialization failed : No such object
> Unable to load modules for /var/lib/samba/private/sam.ldb:
> dsdb_module_search_dn: did not find base dn @ROOTDSE (0 results)
> Traceback (most recent call last):
>   File "./chgtdcpass", line 58, in <module>
>     ldbs = get_ldbs(paths, creds, session, lp)
>   File "/usr/lib64/python3.8/site-packages/samba/upgradehelpers.py",

As you seem to have possibly compiled Samba into /opt and the path
above appears to be a standard package path, I wonder if you are using
the correct chgtdcpass ?
What is your $PATH ?
Does it start with /opt/samba/bin/:/opt/samba/sbin/ ?
Is the python path correct ?

Rowland



More information about the samba mailing list