summaryrefslogtreecommitdiff
path: root/source4/setup/setpassword
diff options
context:
space:
mode:
Diffstat (limited to 'source4/setup/setpassword')
-rwxr-xr-xsource4/setup/setpassword4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/setup/setpassword b/source4/setup/setpassword
index 90a217fb6f..d44f143e63 100755
--- a/source4/setup/setpassword
+++ b/source4/setup/setpassword
@@ -41,6 +41,7 @@ credopts = options.CredentialsOptions(parser)
parser.add_option_group(credopts)
parser.add_option("--filter", help="LDAP Filter to set password on", type=str)
parser.add_option("--newpassword", help="Set password", type=str)
+parser.add_option("--must-change-at-next-login", help="Force password to be changed on next login", action="store_true")
opts, args = parser.parse_args()
@@ -74,4 +75,5 @@ creds = credopts.get_credentials(lp)
samdb = SamDB(url=lp.get("sam database"), session_info=system_session(),
credentials=creds, lp=lp)
-samdb.setpassword(filter, password)
+samdb.setpassword(filter, password, must_change_at_next_login=opts.must_change_at_next_login)
+