NT Server Manager..

Jeremy Allison jallison at cthulhu.engr.sgi.com
Thu Sep 24 16:12:51 GMT 1998

Luke Kenneth Casson Leighton wrote:
> jeremy,
> the pdb_is_rid_user() function appears to be getting in the way, somehow.
> i allocated a user rid in private/smbpasswd of "1001" to the user
> "administrator".  in rpc_server/samr.c, in the query_userinfo code, the
> pdb_is_rid_user() gets "1001" and fails the call with

You can't allocate a user rid in private/smbpasswd because the
numbers in there are UNIX userids - *NOT* rids.


pdb_rid_is_user(0x1001) will fail with NT_STATUS_NO_SUCH_USER
as it takes a RID, which is a mapping of a UNIX userid.

In the current code this mapping is done by shifting the
userid up one bit and OR'ing in a 1 if it was a UNIX
group not a user id.

The RID you should be looking up for a UNIX userid of
1001 (0xe39) would be : 0x3e9 << 1. That's what the
client side code should be looking up.

We went through all this a few months ago..... :-).


Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-ntdom mailing list