tdbsam: RID/SID change issue + patch

Alexander Zagrebin alexz at visp.ru
Wed Mar 18 17:44:51 GMT 2009


I'm using samba 3.3.2
I have found, that, when using tdbsam, pdbedit refuses to change account's
rid/sid.

# pdbedit -U 3000 -u test
Unable to modify TDB passwd: NT_STATUS_UNSUCCESSFUL!
Unable to modify entry!

Suppose we have changed RID from <old_rid> to <new_rid>.
When updating account information with changed RID, pdbedit tries to update
key USER_<username> and
key RID_<new_rid>. But passdb.tdb contains RID_<old_rid>, but not
RID_<new_rid>.
That's a source of above described error.
So instead of updating RID_<new_rid> pdbedit have to delete RID_<old_rid>
and add 
RID_<new_rid>.

The attached patch resolves this issue.

-- 
Alexander Zagrebin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-passdb!!pdb_tdb.c
Type: application/octet-stream
Size: 2232 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090318/3ca1320e/patch-passdbpdb_tdb.obj


More information about the samba-technical mailing list