Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include = in smb.conf

Status
Not open for further replies.

dan

MIS
Oct 7, 1998
298
US
I have two groups and would like to set samba permissions based on groups. I have read in 2 samba books that variables are permitted in the include command. I can get the following to work:
include = /home/%U/smb.conf
but not
include = /home/%G/smb.conf or
include = /home/%g/smb.conf
I really don't want a config file in everyones home directory. Does anyone know how to make this work with group variables or something else?
Dan
 
Hi,

Although the man page says they are the same, I have seen reference to '%G' meaning use the user's primary linux group but '%g' meaning to use the group specified on the 'force group=' directive in smb.conf . Not sure about that but you could try to use 'force group' if everyone is in one linux group anyway :

force group = smbusers

Hope this helps
 
Actually, I have 2 groups: Faculty and Students
I want faculty to write with 755 permissions and students to write with 770 permissions to the same share. I thought that by using an include statement to create the share I could assign different create mask for each group. (My assumption is to use %G as the primary group for a student is Students and the primary group for a faculty member is Faculty.
If I use:
include = /home/Faculty/smb.conf
it works, But if I use
include = /home/%G/smb.conf
when a member of Faculty logs in it does not execute the include file
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top