modifying the SAM directly

Hernan Ochoa soporte at
Mon Feb 22 11:42:41 GMT 1999


i want to modify the SAM database in the registry directly.

the key is HKEY_LOCAL_MACHINE\Security\SAM\Domains\Account\Users

and then i have all the users RID, and i know how to modify the V records
thanks to the pwdump samba program.

ok, my problem is, i can't get the right permissions i need in the call to
RegOpenKeyEx to be able to set the V value.

i tried KEY_SET_VALUE but it tells that i can't open it.

i also did this, i used regedt32 and i gave to the Administrators group FULL
CONTROL to the whole key tree, but in my program, i still CAN'T modify the
damn key.

suppose i want to modify

that is a user's rid, inside that key is a F value and a V value.

now, i try to open the key with RegOpenKeyEx and with the access set to
KEY_SET_VALUE among other permissions, and i can't open the damn key.

why? if i use regedt32 and i try to change it by hand i can do it, why can't
i do it in coding?

thanks in advance .

More information about the samba-ntdom mailing list