mirror of
https://github.com/samba-team/samba.git
synced 2025-07-28 11:42:03 +03:00
samba-tool: nicer error in passwordsettings with no settings
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
@ -479,6 +479,8 @@ class cmd_domain_passwordsettings(Command):
|
||||
if max_pwd_age > 0 and min_pwd_age >= max_pwd_age:
|
||||
raise CommandError("Maximum password age (%d) must be greater than minimum password age (%d)!" % (max_pwd_age, min_pwd_age))
|
||||
|
||||
if len(m) == 0:
|
||||
raise CommandError("You must specify at least one option to set. Try --help")
|
||||
samdb.modify(m)
|
||||
msgs.append("All changes applied successfully!")
|
||||
self.message("\n".join(msgs))
|
||||
|
Reference in New Issue
Block a user