Bug 9710 - Password strength in samba tool calculated AFTER setup
Summary: Password strength in samba tool calculated AFTER setup
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.0.3
Hardware: All All
: P5 trivial (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
: 12235 (view as bug list)
Depends on:
Reported: 2013-03-11 15:42 UTC by Tim Vangehugten
Modified: 2018-05-20 08:33 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Vangehugten 2013-03-11 15:42:03 UTC
It would be nice if the password strength in the samba-tool would be calculated before setting anything up as demonstrated in the example below:

/usr/local/samba/bin/samba-tool domain provision
Realm [DOMAIN.COM]: 
 Domain [DOMAIN]: 
 Server Role (dc, member, standalone) [dc]: dc
 DNS forwarder IP address (write 'none' to disable forwarding) [x.x.x.x]: 
Administrator password: 
Retype password: 
Looking up IPv4 addresses
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up share.ldb
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Adding DomainDN: DC=DOMAIN,DC=com
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Modifying display specifiers
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
ERROR(ldb): uncaught exception - 0000052D: Constraint violation - check_password_restrictions: the password does not meet the complexity criteria!
  File "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/domain.py", line 398, in run
    use_rfc2307=use_rfc2307, skip_sysvolacl=False)
  File "/usr/local/samba/lib/python2.7/site-packages/samba/provision/__init__.py", line 2146, in provision
  File "/usr/local/samba/lib/python2.7/site-packages/samba/provision/__init__.py", line 1748, in provision_fill
    next_rid=next_rid, dc_rid=dc_rid)
  File "/usr/local/samba/lib/python2.7/site-packages/samba/provision/__init__.py", line 1436, in fill_samdb
    "KRBTGTPASS_B64": b64encode(krbtgtpass.encode('utf-16-le'))
  File "/usr/local/samba/lib/python2.7/site-packages/samba/provision/common.py", line 50, in setup_add_ldif
    ldb.add_ldif(data, controls)
  File "/usr/local/samba/lib/python2.7/site-packages/samba/__init__.py", line 224, in add_ldif
    self.add(msg, controls)

Best Regards

Tim Vangehugten
Comment 1 Andrew Bartlett 2018-05-20 08:33:06 UTC
Fixed by 698d28ee8cf4ff8258f2e6fe9b88d81f842584aa in master for Samba 4.8.
Comment 2 Andrew Bartlett 2018-05-20 08:33:22 UTC
*** Bug 12235 has been marked as a duplicate of this bug. ***