diff options
author | Jeremy Allison <jra@samba.org> | 2000-11-16 21:33:21 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-11-16 21:33:21 +0000 |
commit | fb71f4a0affd90102cc7866dfd081c01bf056410 (patch) | |
tree | 56869ea47584d75efabb06108a2d6a15162b6c21 /source3 | |
parent | 9df3d64a2cdb2eafad5f597850f1a2fda8b1f8d2 (diff) | |
download | samba-fb71f4a0affd90102cc7866dfd081c01bf056410.tar.gz samba-fb71f4a0affd90102cc7866dfd081c01bf056410.tar.bz2 samba-fb71f4a0affd90102cc7866dfd081c01bf056410.zip |
Fix for plaintext passwords from Pat Sandfort @ HP.
Jeremy.
(This used to be commit b8753b92fbeb1d6768d0559e12ff2aa1d0148419)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/cmd_interp.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); } } |