[Samba] uid and gid from unix to unix

Adam Cankudis adamc at pons.pl
Fri Jul 1 11:49:58 GMT 2005


Server: Samba 3.0.14a on Debian 3.1 stable with kernel 2.6.8.1
Client smbclient 3.0.7 on Mandrake 10.1

Problem: Share is mounted (by smbmount) with uid's and gid's values from 
Debian server. So user have no proper rights to catalogues in mounted 
shares on his local machine.
Question: How to make uid and gid "mapping" from unix to unix?

Exemplary: User john has uid=502 and gid=502 on his local machine. He 
has account on the server also, but he has uid=516 and gid=510 on the 
server. After smbmount of share (samba logs shows that all 
authentication is succeeded and user is properly mapped to unix user) 
local user gots mounted share with uid=516 and gid=510.

Of course, in consequence, local user cannot read/write to his files but 
He can read/write to files which belongs to another user, who's uid on 
remote machine is equiv to uid of the user on a local machine (this 
could happen if we have i.e."public" share).

Some historical informations: This sittuation occurred after change of a 
system on the server. I had a RedHat9 before and there was no problem 
with that "mapping". I copied parts of files about plain users from: 
/etc/passwd, /etc/group, /etc/shadow, /etc/gshadow, and whole files: 
/etc/samba/smbpasswd, /etc/samba/smb.users, /etc/samba/smb.conf in to 
the new system.

With best
A.C.


More information about the samba mailing list