Hello, I'm wondering if it possible to use the %G variable to include config file based on group membership. Basically, my setup is this: Samba configured as a member of a Active Directory Domain using WinBind for authentication and account management. I want the ability to have a different config file loaded for a Students and Staff. Is this even possible?? Thanks in advance!! ************************ David J. Lucas, CCNA Oyster River Cooperative School District Phone: (603) 868-5100 ext. 41
David Lucas wrote:> I'm wondering if it possible to use the %G variable to include config file > based on group membership....> Is this even possible??Theoretically should work, why not try it? (-: -- Rex
Yeah, I have tried it and it didn't work. But as soon as I added the %m variable or the name of the file it worked. This solution will not work for me seeing I need this based on groups.. Does anyone have a way that I could get this to work?? I REALLY want this to work so I can get away from Windows and use Linux. Dave -----Original Message----- From: samba-bounces+djlucas=orcsd.org@lists.samba.org [mailto:samba-bounces+djlucas=orcsd.org@lists.samba.org] On Behalf Of Rex Dieter Sent: Wednesday, December 07, 2005 9:55 PM To: samba@lists.samba.org Subject: [Samba] Re: include statement in smb.conf David Lucas wrote:> I'm wondering if it possible to use the %G variable to include config file > based on group membership....> Is this even possible??Theoretically should work, why not try it? (-: -- Rex -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
I have been doing this successfully for years (w/ Samba 2.2.8a) include = /etc/samba/u%U.conf Of course, this is just the user(s) primary group we are talking about . Gary R. Webster "David Lucas" <djlucas@orcsd.org> Sent by: samba-bounces+webster=lexmark.com@lists.samba.org 12/08/05 07:48 AM To: <samba@lists.samba.org> cc: Subject: RE: [Samba] Re: include statement in smb.conf Yeah, I have tried it and it didn't work. But as soon as I added the %m variable or the name of the file it worked. This solution will not work for me seeing I need this based on groups.. Does anyone have a way that I could get this to work?? I REALLY want this to work so I can get away from Windows and use Linux. Dave -----Original Message----- From: samba-bounces+djlucas=orcsd.org@lists.samba.org [mailto:samba-bounces+djlucas=orcsd.org@lists.samba.org] On Behalf Of Rex Dieter Sent: Wednesday, December 07, 2005 9:55 PM To: samba@lists.samba.org Subject: [Samba] Re: include statement in smb.conf David Lucas wrote:> I'm wondering if it possible to use the %G variable to include configfile> based on group membership....> Is this even possible??Theoretically should work, why not try it? (-: -- Rex
Hmmm, I've tried that and it worked!! But, it is not what I'm looking to do. Say I have a User in the Windows 2000 Active Directory with their primary group set to Staff. What I would like is to have samba include smb.conf.staff as their configuration and that would contain things such as different shares and special veto options and their Home directory would be located in /home/staff/%username%. Now, if I have a user with their primary group set to Student then I want it to load smb.conf.student with a different set a shares and veto files and such. And their home directory would be located in /home/students/%Year_Of_Gradutaion%/%username%. Is there away that I will be able to do this?? The only way that I got it to work was to not use the %G. And we just have WAY too many users to specify a config file for each user. Again, thank you. Dave -----Original Message----- From: samba-bounces+djlucas=orcsd.org@lists.samba.org [mailto:samba-bounces+djlucas=orcsd.org@lists.samba.org] On Behalf Of webster@lexmark.com Sent: Thursday, December 08, 2005 11:19 AM To: samba@lists.samba.org Subject: RE: [Samba] Re: include statement in smb.conf I have been doing this successfully for years (w/ Samba 2.2.8a) include = /etc/samba/u%U.conf Of course, this is just the user(s) primary group we are talking about . Gary R. Webster "David Lucas" <djlucas@orcsd.org> Sent by: samba-bounces+webster=lexmark.com@lists.samba.org 12/08/05 07:48 AM To: <samba@lists.samba.org> cc: Subject: RE: [Samba] Re: include statement in smb.conf Yeah, I have tried it and it didn't work. But as soon as I added the %m variable or the name of the file it worked. This solution will not work for me seeing I need this based on groups.. Does anyone have a way that I could get this to work?? I REALLY want this to work so I can get away from Windows and use Linux. Dave -----Original Message----- From: samba-bounces+djlucas=orcsd.org@lists.samba.org [mailto:samba-bounces+djlucas=orcsd.org@lists.samba.org] On Behalf Of Rex Dieter Sent: Wednesday, December 07, 2005 9:55 PM To: samba@lists.samba.org Subject: [Samba] Re: include statement in smb.conf David Lucas wrote:> I'm wondering if it possible to use the %G variable to include configfile> based on group membership....> Is this even possible??Theoretically should work, why not try it? (-: -- Rex -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Sorry, I mistyped. I meant: include = /etc/samba/g%G.conf As I see it, this should do what you want. "David Lucas" <djlucas@orcsd.org> Sent by: samba-bounces+webster=lexmark.com@lists.samba.org 12/08/05 03:20 PM To: <samba@lists.samba.org> cc: Subject: RE: [Samba] Re: include statement in smb.conf Hmmm, I've tried that and it worked!! But, it is not what I'm looking to do. Say I have a User in the Windows 2000 Active Directory with their primary group set to Staff. What I would like is to have samba include smb.conf.staff as their configuration and that would contain things such as different shares and special veto options and their Home directory would be located in /home/staff/%username%. Now, if I have a user with their primary group set to Student then I want it to load smb.conf.student with a different set a shares and veto files and such. And their home directory would be located in /home/students/%Year_Of_Gradutaion%/%username%. Is there away that I will be able to do this?? The only way that I got it to work was to not use the %G. And we just have WAY too many users to specify a config file for each user. Again, thank you. Dave -----Original Message----- From: samba-bounces+djlucas=orcsd.org@lists.samba.org [mailto:samba-bounces+djlucas=orcsd.org@lists.samba.org] On Behalf Of webster@lexmark.com Sent: Thursday, December 08, 2005 11:19 AM To: samba@lists.samba.org Subject: RE: [Samba] Re: include statement in smb.conf I have been doing this successfully for years (w/ Samba 2.2.8a) include = /etc/samba/u%U.conf Of course, this is just the user(s) primary group we are talking about . Gary R. Webster "David Lucas" <djlucas@orcsd.org> Sent by: samba-bounces+webster=lexmark.com@lists.samba.org 12/08/05 07:48 AM To: <samba@lists.samba.org> cc: Subject: RE: [Samba] Re: include statement in smb.conf Yeah, I have tried it and it didn't work. But as soon as I added the %m variable or the name of the file it worked. This solution will not work for me seeing I need this based on groups.. Does anyone have a way that I could get this to work?? I REALLY want this to work so I can get away from Windows and use Linux. Dave -----Original Message----- From: samba-bounces+djlucas=orcsd.org@lists.samba.org [mailto:samba-bounces+djlucas=orcsd.org@lists.samba.org] On Behalf Of Rex Dieter Sent: Wednesday, December 07, 2005 9:55 PM To: samba@lists.samba.org Subject: [Samba] Re: include statement in smb.conf David Lucas wrote:> I'm wondering if it possible to use the %G variable to include configfile> based on group membership....> Is this even possible??Theoretically should work, why not try it? (-: -- Rex