ubuntu server samba file/dir write group setting

Asked by Peets

ubuntu 10.04 Samba Server: several PCs with different OSses are connected to a Samba server;
works fine, except for e.g:
- user named xx writes a file or creates a dirctory via smb, the file test.dat gets the rights
  on the linux file system:
   ... xx xx ... for user and group
- since other users schould have access to the same files, all users belong to the group
  'sambashare' (or 'users'). What i need is are the rights
   ... xx sambahare ... or
   ... xx users ...

Question:
======
  how can I make Samba generate files and directories with the user as owner and the groupname for the group ?

excerpt from smb.conf:
[global]
   workgroup = LOC
   wins server = 10.234.123.3
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   # Auth
   security = user
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user

... printer stuff ...

[profiles]
   comment = Users profiles
   path = /netz/%u
   guest ok = no
   browseable = no
   create mask = 0600
   directory mask = 0700

[homes]
   comment = Home Directories
   browseable = no
   path = /netz/%S
   inherit acls = Yes
   browseable = No
   read only = no
   create mask = 0700
   directory mask = 0700
   valid users = %S, %D%w%S

[lan]
 path = /netz/lan07
 read only = No
 create mask = 0774
 directory mask = 0775
 #available = No
 inherit acls = Yes

for the [homes] the xx xx for user and group are fine, but not for the [lan]

------- can anyone help me what I did wrong ? -----
I was usiing a suse linux server before and it automatically generated xx:users files and dirs during the past 12 years (over several versions :)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu samba Edit question
Assignee:
No assignee Edit question
Solved by:
Peets
Solved:
Last query:
Last reply:
Revision history for this message
Peets (pl-loster) said :
#1

... found out the problem:
added to the [lan] share the line

  force group = sambashare

now all users join the group sambashare and can read-write.

Revision history for this message
Peets (pl-loster) said :
#2

... found out the problem:
added to the [lan] share the line

  force group = sambashare

now all users join the group sambashare and can read-write.

Revision history for this message
Peets (pl-loster) said :
#3

... found out the problem:
added to the [lan] share the line

  force group = sambashare

now all users join the group sambashare and can read-write.