summaryrefslogtreecommitdiff
path: root/source3/utils
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
commit8851d1a1509a877a1b4a080060292c62a9665315 (patch)
tree64e18923eedd35817bd315fb17728545acf627bd /source3/utils
parente746555102e2a959a81ccd79473351b8cc7df2ef (diff)
downloadsamba-8851d1a1509a877a1b4a080060292c62a9665315.tar.gz
samba-8851d1a1509a877a1b4a080060292c62a9665315.tar.bz2
samba-8851d1a1509a877a1b4a080060292c62a9665315.zip
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. (This used to be commit dd3bb250a6fb6020d32ea35d7a3d3301d7f9764b)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbpasswd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index bce5d7512f..883acd0941 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/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);