[Samba] UID Matching

Gaiseric Vandal gaiseric.vandal at gmail.com
Tue Jan 18 15:22:17 MST 2011

Just to clarify , by uid you mean then numerical user id?

Unix uid's are different that Windows SID's -  so they will never be 
identical.   Samba has idmapping functionality to map unix id's (e.g. 
123) to samba sid's (e.g 

Since you already have active directory in place you probably want to do 
the following:
     -  configure samba as a member server of the windows AD domain
     - configure unix authentication to use the samba server in place of 
NIS  (e.g. when you log in to unix, /etc/nsswitch.conf is configured to 
resolve password and groups via winbind.)

Samba shd allocate unix id's for your windows accounts,  but 
unfortunately they will not end up being the same as your existing uid's.

Windows Server has (at least 2003 did) Services for Unix, which should 
add some basic NIS functionality to Windows Server.       It at least 
lets your Windows account store some basic unix account info.  But I 
don't know if you can configure samba to use those.

On 01/18/2011 04:44 PM, Brian D. McGrew wrote:
> Good afternoon...
> Currently my Unix and Windows UID's don't match, nowhere close to it.  I use
> AD for the Windows side of the house from a Win2K8 Server and I still use
> NIS for the Unix/Linux side of the house.  I don't do single sign-on yet, so
> everyone in the building has a Windows account and a Unix account with two
> different UID's, but the same username.
> Now, I'm at a point where I need to share a filesystem from a Samba server
> to Windows, but it also needs to be accessible via NFS to the Unix users at
> the same time.
> What is the best way to do this and get some cohesion between the UID's???
> I was thinking I could extend AD with the Unix stuff but then stopped and
> realized I'd be better of asking the world than guessing, in a production
> environment.
> Thanks!
> -b

More information about the samba mailing list