summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-10-30 23:53:04 +0000
committerJeremy Allison <jra@samba.org>1998-10-30 23:53:04 +0000
commitdd3bb250a6fb6020d32ea35d7a3d3301d7f9764b (patch)
treeba3a7be604d21c1f4237272c8e82c97027f1a0d3
parent7f3c96c5dae19b203bf79a88225768003d2f7516 (diff)
downloadsamba-dd3bb250a6fb6020d32ea35d7a3d3301d7f9764b.tar.gz
Fix suggested by Nicholas.S.Jenkins@cdc.com - connect to the
password change server as anonymous - you don't need to have logged on as the user to do the password change. Doh ! (Why didn't *I* think of that one.... :-). Jeremy.
-rw-r--r--source/utils/smbpasswd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c
index bce5d7512fd..883acd09410 100644
--- a/source/utils/smbpasswd.c
+++ b/source/utils/smbpasswd.c
@@ -495,8 +495,13 @@ int main(int argc, char **argv)
exit(1);
}
- if (!cli_session_setup(&cli, user_name, old_passwd, strlen(old_passwd),
- "", 0, "")) {
+ /*
+ * We should connect as the anonymous user here, in case
+ * the server has "must change password" checked...
+ * Thanks to <Nicholas.S.Jenkins@cdc.com> for this fix.
+ */
+
+ if (!cli_session_setup(&cli, "", "", 0, "", 0, "")) {
fprintf(stderr, "%s: machine %s rejected the session setup. Error was : %s.\n",
prog_name, remote_machine, cli_errstr(&cli) );
cli_shutdown(&cli);