From fb71f4a0affd90102cc7866dfd081c01bf056410 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 16 Nov 2000 21:33:21 +0000 Subject: Fix for plaintext passwords from Pat Sandfort @ HP. Jeremy. (This used to be commit b8753b92fbeb1d6768d0559e12ff2aa1d0148419) --- source3/lib/cmd_interp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source3/lib/cmd_interp.c') diff --git a/source3/lib/cmd_interp.c b/source3/lib/cmd_interp.c index 60a3f248c3..8951db10cf 100644 --- a/source3/lib/cmd_interp.c +++ b/source3/lib/cmd_interp.c @@ -647,19 +647,22 @@ static void set_user_password(struct ntuser_creds *u, if (password == NULL) { DEBUG(10, ("set_user_password: NULL pwd\n")); - pwd_set_nullpwd(&(u->pwd)); + pwd_set_nullpwd(&u->pwd); } else { /* generate 16 byte hashes */ DEBUG(10, ("set_user_password: generate\n")); - pwd_make_lm_nt_16(&(u->pwd), password); + if (lp_encrypted_passwords()) + pwd_make_lm_nt_16(&u->pwd, password); + else + pwd_set_cleartext(&u->pwd, password); } } else { DEBUG(10, ("set_user_password: read\n")); - pwd_read(&(u->pwd), "Enter Password:", True); + pwd_read(&u->pwd, "Enter Password:", True); } } -- cgit