Mapping of RIDs to uid_t and gid_t

Jeremy Allison jallison at whistle.com
Fri Apr 3 17:53:07 GMT 1998


David Collier-Brown wrote:
> 
> 
>         This block-allocation is very common at at least
>         York University and several large commercial sites,
>         so groups can cooperate on generating unique userids.
>         This means that the high 4 bits can be taken (although
>         most people avoid setting bit 31 (:-))
> 
>         Therefor ((uid+1000) & 28bits) may cause loss of
>         significant digits. **May**!  It's probabilistic...

Yes I know - there's not much I can do about that though.
I have to map the UNIX uid_t's into the 32 bit space somehow,
and it has to be a static mapping as NT machines may cache
the SID.

> 
>         Are the group and machine ID's randomly distributed, or are
>         they individually counted up from 0?  I'm having a half-baked
>         thought (;-))
> 

*Everything* - machine accounts, user accounts, groups
etc. are mapped into the 32 bit RID space.

Jean Francois Micouleau wrote :

> Do we really need one uid by machine ?

Yes we do. All machines must be able to be
uniquely identified. It would help if the
machine account was actually allocated in
the unix /etc/passwd file but I don't want
to require that.

Also, as Luke pointed out - the 'aliases'
are actually local groups.

This leads to an interesting implementation
possibility.

If the Samba PDC is set to be the NIS/NIS+ master,
then the user/group account database available
via YP becomes the Domain account database,
and the local accounts on the local Samba
servers within that domain become the local
users and the aliases. Hmmmmm....

Jeremy.

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


More information about the samba-technical mailing list