[Samba] Veto files applied per group
dave at dcdata.co.za
Mon Jan 31 18:44:08 GMT 2005
Sorry to bug you with this, but I've tried it and it does not seem to
work - perhaps something I've missed ?
Running "testparm" gives me the following error:
"Can't find include file /usr/local/samba/lib/%g-smb.conf"
In my smb.conf I have the following:
comment = Home Directories
read only = no
create mask = 0600
directory mask = 0700
browseable = no
include = /usr/local/samba/lib/%g-smb.conf
In the /usr/local/samba/lib/students-smb.conf file I have only the
veto files = /*.mp3/*.avi/*.mpg/
Running smbmount and mounting the share as the user who is a student and
writing a .mp3 file to the share works perfectly when it should be denied.
When I do this I get the same "can't find include file..." error before
smbmount actually mounts the share.
I've tried various things including "%G" instead of "%g" etc. It just seems
that Samba is not expanding the %G or %g variables.
Any ideas ?
Thank you for your assistance.
D c D a t a
Tel +27 33 342 7003
Fax +27 33 345 4155
Cell +27 82 4147413
support at dcdata.co.za
Powered by Linux, driven by passion !
"Computers are not intelligent. They only think they are."
----- Original Message -----
From: ""M. Müller"" <malte.mueller at ewetel.net>
To: "David Wilson" <dave at dcdata.co.za>; <samba at lists.samba.org>
Sent: Monday, January 31, 2005 11:56 AM
Subject: Re: [Samba] Veto files applied per group
> You could also include just a students.conf or students-home.conf in the
> [home] Definition:
> include %G-home.conf
> If there is no %G-home.conf e.g. teachers-home.conf, then nothing is
> included. Otherwise the definitions are overwritten or extended by the
> You just have to write less lines.
> Malte Mueller
> David Wilson schrieb:
>>I use "veto files = /.mp3/.mpg/" etc. on the [homes] share to prevent
>>users from storing media files on a Samba server in the home directories.
>>My client now wishes to make this restriction apply to users who are
>>members of only certain groups.
>>E.g. This restriction must apply to users who are members of the
>>"Students" group and not apply to users in the "Teachers" group.
>>I was thinking of having a blank smb.conf file with only the following in
>>include = /etc/samba/smb.conf.%G
>>Then having two smb.conf files, namely smb.conf.Teachers and
>>The smb.conf.Students file would have the entire config file and the "veto
>>The smb.conf.Teachers file would have the entire config file but without
>>the "veto files" parameter.
>>Makes sense ? Is there perhaps a better way to do this ?
>>D c D a t a
>>Tel +27 33 342 7003
>>Fax +27 33 345 4155
>>Cell +27 82 4147413
>>support at dcdata.co.za
>>Powered by Linux, driven by passion ! _______________________________
>>"Computers are not intelligent. They only think they are."
More information about the samba