[Samba] Map multiple NT users to the same Unix user with tdbsam

Christian Aichinger Greek0 at gmx.net
Tue Mar 1 12:12:16 MST 2011


Hi!

I have an NTFS partition on an USB HDD mounted with uid=1000, gid=1000. 
Several users should be able to backup to that partition via Samba shares.
They should be able to log in each with their own user/pass. I'd rather 
not have a separate unix account (/etc/passwd) for each of them (plus 
that runs into trouble with the uid==gid==1000 problem on the NTFS 
partition; I'd rather not set the whole NTFS disk world-writeable to 
circumvent that).  And I'd really like to avoid ldap, sticking with tdbsam.

What I wish I could do was having multiple user/password combinations on 
the Windows side and map them all to one user on the unix side.

username map looked like the solution, but isn't; quoting the 
documentation: "... for user or share mode security, the username map is 
applied prior to validating the user credentials." Thus AIUI all the 
users would be required to share a password (that of the user they are 
mapped to).

The only other thing I can think of is using share level security, and 
giving every user one share he can use. Seems possible but suboptimal.

Having something like username map, but with it being applied after 
credential validation would exactly solve my problem (if smbpasswd let 
me create users absent from /etc/passwd).

Is there any way to achieve something like this? Anyone got another 
solution for my scenario?

Cheers,
Christian

PS: running Samba 3.5.6 on Debian Squeeze Linux on i386, currently 
security=user
PPS: please CC me as I'm not on the list


More information about the samba mailing list