diff options
author | Luke Leighton <lkcl@samba.org> | 1999-03-25 21:32:04 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-03-25 21:32:04 +0000 |
commit | 068e77c86104c5cae2edc4418797e656d617e182 (patch) | |
tree | 7cf362e13c44a7a972314164992c443c3e654ddd /source3/rpc_server | |
parent | 754be76bde565cb855877071e4454930bea65aae (diff) | |
download | samba-068e77c86104c5cae2edc4418797e656d617e182.tar.gz samba-068e77c86104c5cae2edc4418797e656d617e182.tar.bz2 samba-068e77c86104c5cae2edc4418797e656d617e182.zip |
"User Manager" - create user + change password now work.
next problem: user group adding not supported so an "access denied"
message is reported instead of "ok" when a new user is created.
(This used to be commit f5f61bd477b4910cb90675c926381342c30a5b16)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_samr.c | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c index 15b2159383..63aa0dc914 100644 --- a/source3/rpc_server/srv_samr.c +++ b/source3/rpc_server/srv_samr.c @@ -1984,20 +1984,38 @@ static BOOL set_user_info_24(SAM_USER_INFO_24 *id24, uint32 rid) ********************************************************************/ static BOOL set_user_info_23(SAM_USER_INFO_23 *id23, uint32 rid) { - static struct sam_passwd *pwd; - fstring new_pw; + struct sam_passwd *pwd = getsam21pwrid(rid); + struct sam_passwd new_pwd; + static uchar nt_hash[16]; + static uchar lm_hash[16]; + pstring new_pw; + + if (pwd == NULL) + { + return False; + } + + pwdb_init_sam(&new_pwd); + copy_sam_passwd(&new_pwd, pwd); +#if 0 + copy_id23_to_sam_passwd(&new_pwd, id23); +#endif + if (!decode_pw_buffer(id23->pass, new_pw, sizeof(new_pw), True)) { return False; } + #ifdef DEBUG_PASSWORD DEBUG(0,("New Password: %s\n", new_pw)); #endif -#if 0 - return mod_sam21pwd_entry(&pwd, True); -#else - return True; -#endif + + nt_lm_owf_gen(new_pw, nt_hash, lm_hash); + + new_pwd.smb_passwd = lm_hash; + new_pwd.smb_nt_passwd = nt_hash; + + return mod_sam21pwd_entry(&new_pwd, True); } /******************************************************************* |