diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-06-18 12:38:04 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-06-18 13:49:30 +1000 |
commit | 1e6fb7d7306ee64ac649afe235e452ac116de394 (patch) | |
tree | 51e4668a33d4aff3fa3529ef477e210bd1d950f3 /source4/setup/newuser | |
parent | 033e25fdcea93763e1e8fe295fb6d2c3d261bcc4 (diff) | |
download | samba-1e6fb7d7306ee64ac649afe235e452ac116de394.tar.gz samba-1e6fb7d7306ee64ac649afe235e452ac116de394.tar.bz2 samba-1e6fb7d7306ee64ac649afe235e452ac116de394.zip |
s4: Add tests and 'must change password' flags in setpassword and newuser
In particular, ensure that we can acutally change the password under
these circumstances.
Andrew Bartlett
Diffstat (limited to 'source4/setup/newuser')
-rwxr-xr-x | source4/setup/newuser | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/setup/newuser b/source4/setup/newuser index 281e3849fa..cc89e922a7 100755 --- a/source4/setup/newuser +++ b/source4/setup/newuser @@ -36,6 +36,7 @@ credopts = options.CredentialsOptions(parser) parser.add_option_group(credopts) parser.add_option("--quiet", help="Be quiet", action="store_true") parser.add_option("--unixname", help="Unix Username", 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() @@ -57,4 +58,4 @@ creds = credopts.get_credentials(lp) samdb = sambaopts.get_hostconfig().get_samdb(session_info=system_session(), credentials=creds) -samdb.newuser(username, opts.unixname, password) +samdb.newuser(username, opts.unixname, password, force_password_change_at_next_login=opts.must_change_at_next_login) |