Multiple resources sharing problem

Peter Samuelson peter at
Mon Apr 17 01:06:42 GMT 2000

[lbabucha at]
> [statistics]
> valid users = stats
> force user = w3
> force group = w3master
> [fixes_statistics]
> valid users = stats_fix
> force user = w3 
> force group = w3master 
> Now I use my username map file were I put:
> stats = NTuser1, NTuser2, 95user3
> stats_fix = NTuser2, 95user5, 95user6
> That works fine for everybody except NTuser2, who can map "stats"
> resource but he is unable to map "stat_fix".

Right, that won't work.  The username map is a function of the NT
username, so you can't map one-to-many.

What you are probably going to have to do is make Unix users, which is
what you say you are trying to avoid.  Put something like this in

  w3:*:350:200:w3 user:/tmp:/bin/true
  NTuser1:*:350:200:samba pseudo-user:/tmp:/bin/true
  NTuser2:*:350:200:samba pseudo-user:/tmp:/bin/true
  95user3:*:350:200:samba pseudo-user:/tmp:/bin/true
  95user5:*:350:200:samba pseudo-user:/tmp:/bin/true
  95user6:*:350:200:samba pseudo-user:/tmp:/bin/true

And in /etc/group:


Then, in smb.conf:

  valid users = +stats

  valid users = +stats_fix

Since everyone has the same UID/GID, you don't need `force user' or
`force group'.  You also don't need a username map file.  Also, nobody
needs to have a valid password for logging on locally.

Alternatively, you could create a third Unix user along with `stats'
and `stats_fix' called `stats_both', make that user valid for both
shares, and put NTuser2 in there.  I think this would be a kludge,


More information about the samba mailing list